diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7bc06d7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: CI + +# Runs on PRs and pushes to the default branch. We use `pull_request` (never +# `pull_request_target`), so secrets are NOT exposed to pull requests from forks. +on: + pull_request: + push: + branches: [main, master] + +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.1' + - name: Install dependencies + run: | + bundle config set --local frozen false + bundle install --jobs 4 + - name: Run tests + run: bundle exec rspec + env: + FASTCOMMENTS_API_KEY: ${{ secrets.FASTCOMMENTS_API_KEY }} + FASTCOMMENTS_TENANT_ID: ${{ secrets.FASTCOMMENTS_TENANT_ID }} diff --git a/README.md b/README.md index 633b9aa..c795c24 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,12 @@ This library contains the generated API client and the SSO utilities to make wor ### Public vs Secured APIs -For the API client, there are two classes, `DefaultApi` and `PublicApi`. The `DefaultApi` contains methods that require your API key, and `PublicApi` contains api calls -that can be made directly from a browser/mobile device/etc without authentication. +For the API client, there are three classes, `DefaultApi`, `PublicApi`, and `ModerationApi`. The `DefaultApi` contains methods that require your API key, and `PublicApi` contains api calls +that can be made directly from a browser/mobile device/etc without authentication. The `ModerationApi` contains the methods that power the moderator dashboard. + +The `ModerationApi` covers comment moderation (list, count, search, logs, export), moderation actions (remove/restore, flag, set review/spam/approval status, votes, reopen/close thread), +bans (ban from a comment, undo, pre-ban summaries, ban status/preferences, banned-user counts), and badges & trust (award/remove badge, manual badges, get/set trust factor, user internal profile). +Each `ModerationApi` method accepts an `sso` parameter so the request can be made on behalf of an SSO-authenticated moderator. ## Quick Start @@ -91,10 +95,30 @@ rescue FastCommentsClient::ApiError => e end ``` +### Using Moderation APIs (ModerationApi) + +The moderation methods power the moderator dashboard. Pass an `sso` token so the request is made on behalf of an SSO-authenticated moderator: + +```ruby +require 'fastcomments' + +moderation_api = FastCommentsClient::ModerationApi.new + +begin + # Example: List comments in the moderation queue + response = moderation_api.get_api_comments( + sso: 'YOUR_MODERATOR_SSO_TOKEN' + ) + puts response +rescue FastCommentsClient::ApiError => e + puts e.message +end +``` + ### Common Issues 1. **401 "missing-api-key" error**: Make sure you set `config.api_key['x-api-key'] = 'YOUR_KEY'` before creating the DefaultApi instance. -2. **Wrong API class**: Use `DefaultApi` for server-side authenticated requests, `PublicApi` for client-side/public requests. +2. **Wrong API class**: Use `DefaultApi` for server-side authenticated requests, `PublicApi` for client-side/public requests, and `ModerationApi` for moderator dashboard requests. 3. **Null API key**: The SDK will silently skip authentication if the API key is null, leading to 401 errors. ## Notes diff --git a/client/.openapi-generator/FILES b/client/.openapi-generator/FILES index 0842f1d..0685dbd 100644 --- a/client/.openapi-generator/FILES +++ b/client/.openapi-generator/FILES @@ -8,9 +8,14 @@ Gemfile README.md Rakefile docs/APIAuditLog.md +docs/APIBanUserChangeLog.md +docs/APIBanUserChangedValues.md +docs/APIBannedUser.md +docs/APIBannedUserWithMultiMatchInfo.md docs/APIComment.md docs/APICommentBase.md docs/APICommentBaseMeta.md +docs/APICommentCommonBannedUser.md docs/APICreateUserBadgeResponse.md docs/APIDomainConfiguration.md docs/APIEmptyResponse.md @@ -22,8 +27,11 @@ docs/APIGetUserBadgeProgressListResponse.md docs/APIGetUserBadgeProgressResponse.md docs/APIGetUserBadgeResponse.md docs/APIGetUserBadgesResponse.md +docs/APIModerateGetUserBanPreferencesResponse.md +docs/APIModerateUserBanPreferences.md docs/APIPage.md docs/APISSOUser.md +docs/APISaveCommentResponse.md docs/APIStatus.md docs/APITenant.md docs/APITenantDailyUsage.md @@ -31,16 +39,17 @@ docs/APITicket.md docs/APITicketDetail.md docs/APITicketFile.md docs/APIUserSubscription.md -docs/AddDomainConfig200Response.md -docs/AddDomainConfig200ResponseAnyOf.md docs/AddDomainConfigParams.md -docs/AddHashTag200Response.md -docs/AddHashTagsBulk200Response.md +docs/AddDomainConfigResponse.md +docs/AddDomainConfigResponseAnyOf.md docs/AddPageAPIResponse.md docs/AddSSOUserAPIResponse.md -docs/AggregateQuestionResults200Response.md +docs/AdjustCommentVotesParams.md +docs/AdjustVotesResponse.md docs/AggregateQuestionResultsResponse.md +docs/AggregateResponse.md docs/AggregateTimeBucket.md +docs/AggregationAPIError.md docs/AggregationItem.md docs/AggregationOpType.md docs/AggregationOperation.md @@ -49,24 +58,30 @@ docs/AggregationRequestSort.md docs/AggregationResponse.md docs/AggregationResponseStats.md docs/AggregationValue.md +docs/AwardUserBadgeResponse.md +docs/BanUserFromCommentResult.md +docs/BanUserUndoParams.md +docs/BannedUserMatch.md +docs/BannedUserMatchMatchedOnValue.md +docs/BannedUserMatchType.md docs/BillingInfo.md docs/BlockFromCommentParams.md -docs/BlockFromCommentPublic200Response.md docs/BlockSuccess.md +docs/BuildModerationFilterParams.md +docs/BuildModerationFilterResponse.md docs/BulkAggregateQuestionItem.md -docs/BulkAggregateQuestionResults200Response.md docs/BulkAggregateQuestionResultsRequest.md docs/BulkAggregateQuestionResultsResponse.md docs/BulkCreateHashTagsBody.md docs/BulkCreateHashTagsBodyTagsInner.md docs/BulkCreateHashTagsResponse.md +docs/BulkCreateHashTagsResponseResultsInner.md +docs/BulkPreBanParams.md +docs/BulkPreBanSummary.md docs/ChangeCommentPinStatusResponse.md -docs/ChangeTicketState200Response.md docs/ChangeTicketStateBody.md docs/ChangeTicketStateResponse.md docs/CheckBlockedCommentsResponse.md -docs/CheckedCommentsForBlocked200Response.md -docs/CombineCommentsWithQuestionResults200Response.md docs/CombineQuestionResultsWithCommentsResponse.md docs/CommentData.md docs/CommentHTMLRenderingMode.md @@ -81,57 +96,43 @@ docs/CommentUserBadgeInfo.md docs/CommentUserHashTagInfo.md docs/CommentUserMentionInfo.md docs/CommenterNameFormats.md +docs/CommentsByIdsParams.md docs/CreateAPIPageData.md docs/CreateAPISSOUserData.md docs/CreateAPIUserSubscriptionData.md docs/CreateCommentParams.md -docs/CreateCommentPublic200Response.md -docs/CreateEmailTemplate200Response.md docs/CreateEmailTemplateBody.md docs/CreateEmailTemplateResponse.md -docs/CreateFeedPost200Response.md docs/CreateFeedPostParams.md -docs/CreateFeedPostPublic200Response.md docs/CreateFeedPostResponse.md docs/CreateFeedPostsResponse.md docs/CreateHashTagBody.md docs/CreateHashTagResponse.md -docs/CreateModerator200Response.md docs/CreateModeratorBody.md docs/CreateModeratorResponse.md -docs/CreateQuestionConfig200Response.md docs/CreateQuestionConfigBody.md docs/CreateQuestionConfigResponse.md -docs/CreateQuestionResult200Response.md docs/CreateQuestionResultBody.md docs/CreateQuestionResultResponse.md docs/CreateSubscriptionAPIResponse.md -docs/CreateTenant200Response.md docs/CreateTenantBody.md -docs/CreateTenantPackage200Response.md docs/CreateTenantPackageBody.md docs/CreateTenantPackageResponse.md docs/CreateTenantResponse.md -docs/CreateTenantUser200Response.md docs/CreateTenantUserBody.md docs/CreateTenantUserResponse.md -docs/CreateTicket200Response.md docs/CreateTicketBody.md docs/CreateTicketResponse.md -docs/CreateUserBadge200Response.md docs/CreateUserBadgeParams.md +docs/CreateV1PageReact.md docs/CustomConfigParameters.md docs/CustomEmailTemplate.md docs/DefaultApi.md -docs/DeleteComment200Response.md docs/DeleteCommentAction.md -docs/DeleteCommentPublic200Response.md docs/DeleteCommentResult.md -docs/DeleteCommentVote200Response.md -docs/DeleteDomainConfig200Response.md -docs/DeleteFeedPostPublic200Response.md -docs/DeleteFeedPostPublic200ResponseAnyOf.md -docs/DeleteHashTagRequest.md +docs/DeleteDomainConfigResponse.md +docs/DeleteFeedPostPublicResponse.md +docs/DeleteHashTagRequestBody.md docs/DeletePageAPIResponse.md docs/DeleteSSOUserAPIResponse.md docs/DeleteSubscriptionAPIResponse.md @@ -150,126 +151,125 @@ docs/FeedPostStats.md docs/FeedPostsStatsResponse.md docs/FindCommentsByRangeItem.md docs/FindCommentsByRangeResponse.md -docs/FlagComment200Response.md -docs/FlagCommentPublic200Response.md docs/FlagCommentResponse.md -docs/GetAuditLogs200Response.md docs/GetAuditLogsResponse.md -docs/GetCachedNotificationCount200Response.md +docs/GetBannedUsersCountResponse.md +docs/GetBannedUsersFromCommentResponse.md docs/GetCachedNotificationCountResponse.md -docs/GetComment200Response.md -docs/GetCommentText200Response.md -docs/GetCommentVoteUserNames200Response.md +docs/GetCommentBanStatusResponse.md +docs/GetCommentTextResponse.md docs/GetCommentVoteUserNamesSuccessResponse.md -docs/GetComments200Response.md -docs/GetCommentsPublic200Response.md +docs/GetCommentsForUserResponse.md docs/GetCommentsResponsePublicComment.md docs/GetCommentsResponseWithPresencePublicComment.md -docs/GetDomainConfig200Response.md -docs/GetDomainConfigs200Response.md -docs/GetDomainConfigs200ResponseAnyOf.md -docs/GetDomainConfigs200ResponseAnyOf1.md -docs/GetEmailTemplate200Response.md -docs/GetEmailTemplateDefinitions200Response.md +docs/GetDomainConfigResponse.md +docs/GetDomainConfigsResponse.md +docs/GetDomainConfigsResponseAnyOf.md +docs/GetDomainConfigsResponseAnyOf1.md docs/GetEmailTemplateDefinitionsResponse.md -docs/GetEmailTemplateRenderErrors200Response.md docs/GetEmailTemplateRenderErrorsResponse.md docs/GetEmailTemplateResponse.md -docs/GetEmailTemplates200Response.md docs/GetEmailTemplatesResponse.md -docs/GetEventLog200Response.md docs/GetEventLogResponse.md -docs/GetFeedPosts200Response.md -docs/GetFeedPostsPublic200Response.md docs/GetFeedPostsResponse.md -docs/GetFeedPostsStats200Response.md -docs/GetHashTags200Response.md +docs/GetGifsSearchResponse.md +docs/GetGifsTrendingResponse.md docs/GetHashTagsResponse.md -docs/GetModerator200Response.md docs/GetModeratorResponse.md -docs/GetModerators200Response.md docs/GetModeratorsResponse.md docs/GetMyNotificationsResponse.md -docs/GetNotificationCount200Response.md docs/GetNotificationCountResponse.md -docs/GetNotifications200Response.md docs/GetNotificationsResponse.md docs/GetPageByURLIdAPIResponse.md docs/GetPagesAPIResponse.md -docs/GetPendingWebhookEventCount200Response.md docs/GetPendingWebhookEventCountResponse.md -docs/GetPendingWebhookEvents200Response.md docs/GetPendingWebhookEventsResponse.md docs/GetPublicFeedPostsResponse.md -docs/GetQuestionConfig200Response.md +docs/GetPublicPagesResponse.md docs/GetQuestionConfigResponse.md -docs/GetQuestionConfigs200Response.md docs/GetQuestionConfigsResponse.md -docs/GetQuestionResult200Response.md docs/GetQuestionResultResponse.md -docs/GetQuestionResults200Response.md docs/GetQuestionResultsResponse.md docs/GetSSOUserByEmailAPIResponse.md docs/GetSSOUserByIdAPIResponse.md -docs/GetSSOUsers200Response.md +docs/GetSSOUsersResponse.md docs/GetSubscriptionsAPIResponse.md -docs/GetTenant200Response.md -docs/GetTenantDailyUsages200Response.md docs/GetTenantDailyUsagesResponse.md -docs/GetTenantPackage200Response.md +docs/GetTenantManualBadgesResponse.md docs/GetTenantPackageResponse.md -docs/GetTenantPackages200Response.md docs/GetTenantPackagesResponse.md docs/GetTenantResponse.md -docs/GetTenantUser200Response.md docs/GetTenantUserResponse.md -docs/GetTenantUsers200Response.md docs/GetTenantUsersResponse.md -docs/GetTenants200Response.md docs/GetTenantsResponse.md -docs/GetTicket200Response.md docs/GetTicketResponse.md -docs/GetTickets200Response.md docs/GetTicketsResponse.md -docs/GetUser200Response.md -docs/GetUserBadge200Response.md -docs/GetUserBadgeProgressById200Response.md -docs/GetUserBadgeProgressList200Response.md -docs/GetUserBadges200Response.md -docs/GetUserNotificationCount200Response.md +docs/GetTranslationsResponse.md +docs/GetUserInternalProfileResponse.md +docs/GetUserInternalProfileResponseProfile.md +docs/GetUserManualBadgesResponse.md docs/GetUserNotificationCountResponse.md -docs/GetUserNotifications200Response.md -docs/GetUserPresenceStatuses200Response.md docs/GetUserPresenceStatusesResponse.md -docs/GetUserReactsPublic200Response.md docs/GetUserResponse.md -docs/GetVotes200Response.md -docs/GetVotesForUser200Response.md +docs/GetUserTrustFactorResponse.md +docs/GetV1PageLikes.md +docs/GetV2PageReactUsersResponse.md +docs/GetV2PageReacts.md docs/GetVotesForUserResponse.md docs/GetVotesResponse.md +docs/GifGetLargeResponse.md docs/GifRating.md +docs/GifSearchInternalError.md +docs/GifSearchResponse.md +docs/GifSearchResponseImagesInnerInner.md docs/HeaderAccountNotification.md docs/HeaderState.md docs/IgnoredResponse.md docs/ImageContentProfanityLevel.md +docs/ImportedAgentApprovalNotificationFrequency.md docs/ImportedSiteType.md docs/LiveEvent.md docs/LiveEventExtraInfo.md docs/LiveEventType.md -docs/LockComment200Response.md docs/MediaAsset.md docs/MentionAutoCompleteMode.md docs/MetaItem.md +docs/ModerationAPIChildCommentsResponse.md +docs/ModerationAPIComment.md +docs/ModerationAPICommentLog.md +docs/ModerationAPICommentResponse.md +docs/ModerationAPICountCommentsResponse.md +docs/ModerationAPIGetCommentIdsResponse.md +docs/ModerationAPIGetCommentsResponse.md +docs/ModerationAPIGetLogsResponse.md +docs/ModerationApi.md +docs/ModerationCommentSearchResponse.md +docs/ModerationExportResponse.md +docs/ModerationExportStatusResponse.md +docs/ModerationFilter.md +docs/ModerationPageSearchProjected.md +docs/ModerationPageSearchResponse.md +docs/ModerationSiteSearchProjected.md +docs/ModerationSiteSearchResponse.md +docs/ModerationSuggestResponse.md +docs/ModerationUserSearchProjected.md +docs/ModerationUserSearchResponse.md docs/Moderator.md docs/NotificationAndCount.md docs/NotificationObjectType.md docs/NotificationType.md +docs/PageUserEntry.md +docs/PageUsersInfoResponse.md +docs/PageUsersOfflineResponse.md +docs/PageUsersOnlineResponse.md +docs/PagesSortBy.md docs/PatchDomainConfigParams.md -docs/PatchHashTag200Response.md +docs/PatchDomainConfigResponse.md docs/PatchPageAPIResponse.md docs/PatchSSOUserAPIResponse.md docs/PendingCommentToSyncOutbound.md -docs/PinComment200Response.md +docs/PostRemoveCommentResponse.md +docs/PreBanSummary.md docs/PubSubComment.md docs/PubSubCommentBase.md docs/PubSubVote.md @@ -281,7 +281,9 @@ docs/PublicBlockFromCommentParams.md docs/PublicComment.md docs/PublicCommentBase.md docs/PublicFeedPostsResponse.md +docs/PublicPage.md docs/PublicVote.md +docs/PutDomainConfigResponse.md docs/PutSSOUserAPIResponse.md docs/QueryPredicate.md docs/QueryPredicateValue.md @@ -294,11 +296,10 @@ docs/QuestionResultAggregationOverall.md docs/QuestionSubQuestionVisibility.md docs/QuestionWhenSave.md docs/ReactBodyParams.md -docs/ReactFeedPostPublic200Response.md docs/ReactFeedPostResponse.md docs/RecordStringBeforeStringOrNullAfterStringOrNullValue.md -docs/RecordStringStringOrNumberValue.md -docs/RenderEmailTemplate200Response.md +docs/RemoveCommentActionResponse.md +docs/RemoveUserBadgeResponse.md docs/RenderEmailTemplateBody.md docs/RenderEmailTemplateResponse.md docs/RenderableUserNotification.md @@ -306,26 +307,27 @@ docs/RepeatCommentCheckIgnoredReason.md docs/RepeatCommentHandlingAction.md docs/ReplaceTenantPackageBody.md docs/ReplaceTenantUserBody.md -docs/ResetUserNotifications200Response.md docs/ResetUserNotificationsResponse.md docs/SORTDIR.md docs/SSOSecurityLevel.md -docs/SaveComment200Response.md -docs/SaveCommentResponse.md docs/SaveCommentResponseOptimized.md +docs/SaveCommentsBulkResponse.md docs/SaveCommentsResponseWithPresence.md -docs/SearchUsers200Response.md docs/SearchUsersResponse.md +docs/SearchUsersResult.md docs/SearchUsersSectionedResponse.md -docs/SetCommentText200Response.md +docs/SetCommentApprovedResponse.md +docs/SetCommentTextParams.md +docs/SetCommentTextResponse.md docs/SetCommentTextResult.md +docs/SetUserTrustFactorResponse.md docs/SizePreset.md docs/SortDirections.md docs/SpamRule.md docs/TOSConfig.md +docs/TenantBadge.md docs/TenantHashTag.md docs/TenantPackage.md -docs/UnBlockCommentPublic200Response.md docs/UnBlockFromCommentParams.md docs/UnblockSuccess.md docs/UpdatableCommentParams.md @@ -345,9 +347,10 @@ docs/UpdateSubscriptionAPIResponse.md docs/UpdateTenantBody.md docs/UpdateTenantPackageBody.md docs/UpdateTenantUserBody.md -docs/UpdateUserBadge200Response.md docs/UpdateUserBadgeParams.md -docs/UpdateUserNotificationStatus200Response.md +docs/UpdateUserNotificationCommentSubscriptionStatusResponse.md +docs/UpdateUserNotificationPageSubscriptionStatusResponse.md +docs/UpdateUserNotificationStatusResponse.md docs/UploadImageResponse.md docs/User.md docs/UserBadge.md @@ -361,31 +364,33 @@ docs/UserSearchResult.md docs/UserSearchSection.md docs/UserSearchSectionResult.md docs/UserSessionInfo.md +docs/UsersListLocation.md docs/VoteBodyParams.md -docs/VoteComment200Response.md docs/VoteDeleteResponse.md docs/VoteResponse.md +docs/VoteResponseStatus.md docs/VoteResponseUser.md docs/VoteStyle.md fastcomments-client.gemspec git_push.sh lib/fastcomments-client.rb lib/fastcomments-client/api/default_api.rb +lib/fastcomments-client/api/moderation_api.rb lib/fastcomments-client/api/public_api.rb lib/fastcomments-client/api_client.rb lib/fastcomments-client/api_error.rb -lib/fastcomments-client/api_model_base.rb lib/fastcomments-client/configuration.rb -lib/fastcomments-client/models/add_domain_config200_response.rb -lib/fastcomments-client/models/add_domain_config200_response_any_of.rb lib/fastcomments-client/models/add_domain_config_params.rb -lib/fastcomments-client/models/add_hash_tag200_response.rb -lib/fastcomments-client/models/add_hash_tags_bulk200_response.rb +lib/fastcomments-client/models/add_domain_config_response.rb +lib/fastcomments-client/models/add_domain_config_response_any_of.rb lib/fastcomments-client/models/add_page_api_response.rb lib/fastcomments-client/models/add_sso_user_api_response.rb -lib/fastcomments-client/models/aggregate_question_results200_response.rb +lib/fastcomments-client/models/adjust_comment_votes_params.rb +lib/fastcomments-client/models/adjust_votes_response.rb lib/fastcomments-client/models/aggregate_question_results_response.rb +lib/fastcomments-client/models/aggregate_response.rb lib/fastcomments-client/models/aggregate_time_bucket.rb +lib/fastcomments-client/models/aggregation_api_error.rb lib/fastcomments-client/models/aggregation_item.rb lib/fastcomments-client/models/aggregation_op_type.rb lib/fastcomments-client/models/aggregation_operation.rb @@ -395,9 +400,14 @@ lib/fastcomments-client/models/aggregation_response.rb lib/fastcomments-client/models/aggregation_response_stats.rb lib/fastcomments-client/models/aggregation_value.rb lib/fastcomments-client/models/api_audit_log.rb +lib/fastcomments-client/models/api_ban_user_change_log.rb +lib/fastcomments-client/models/api_ban_user_changed_values.rb +lib/fastcomments-client/models/api_banned_user.rb +lib/fastcomments-client/models/api_banned_user_with_multi_match_info.rb lib/fastcomments-client/models/api_comment.rb lib/fastcomments-client/models/api_comment_base.rb lib/fastcomments-client/models/api_comment_base_meta.rb +lib/fastcomments-client/models/api_comment_common_banned_user.rb lib/fastcomments-client/models/api_create_user_badge_response.rb lib/fastcomments-client/models/api_domain_configuration.rb lib/fastcomments-client/models/api_empty_response.rb @@ -409,7 +419,10 @@ lib/fastcomments-client/models/api_get_user_badge_progress_list_response.rb lib/fastcomments-client/models/api_get_user_badge_progress_response.rb lib/fastcomments-client/models/api_get_user_badge_response.rb lib/fastcomments-client/models/api_get_user_badges_response.rb +lib/fastcomments-client/models/api_moderate_get_user_ban_preferences_response.rb +lib/fastcomments-client/models/api_moderate_user_ban_preferences.rb lib/fastcomments-client/models/api_page.rb +lib/fastcomments-client/models/api_save_comment_response.rb lib/fastcomments-client/models/api_status.rb lib/fastcomments-client/models/api_tenant.rb lib/fastcomments-client/models/api_tenant_daily_usage.rb @@ -418,24 +431,30 @@ lib/fastcomments-client/models/api_ticket_detail.rb lib/fastcomments-client/models/api_ticket_file.rb lib/fastcomments-client/models/api_user_subscription.rb lib/fastcomments-client/models/apisso_user.rb +lib/fastcomments-client/models/award_user_badge_response.rb +lib/fastcomments-client/models/ban_user_from_comment_result.rb +lib/fastcomments-client/models/ban_user_undo_params.rb +lib/fastcomments-client/models/banned_user_match.rb +lib/fastcomments-client/models/banned_user_match_matched_on_value.rb +lib/fastcomments-client/models/banned_user_match_type.rb lib/fastcomments-client/models/billing_info.rb lib/fastcomments-client/models/block_from_comment_params.rb -lib/fastcomments-client/models/block_from_comment_public200_response.rb lib/fastcomments-client/models/block_success.rb +lib/fastcomments-client/models/build_moderation_filter_params.rb +lib/fastcomments-client/models/build_moderation_filter_response.rb lib/fastcomments-client/models/bulk_aggregate_question_item.rb -lib/fastcomments-client/models/bulk_aggregate_question_results200_response.rb lib/fastcomments-client/models/bulk_aggregate_question_results_request.rb lib/fastcomments-client/models/bulk_aggregate_question_results_response.rb lib/fastcomments-client/models/bulk_create_hash_tags_body.rb lib/fastcomments-client/models/bulk_create_hash_tags_body_tags_inner.rb lib/fastcomments-client/models/bulk_create_hash_tags_response.rb +lib/fastcomments-client/models/bulk_create_hash_tags_response_results_inner.rb +lib/fastcomments-client/models/bulk_pre_ban_params.rb +lib/fastcomments-client/models/bulk_pre_ban_summary.rb lib/fastcomments-client/models/change_comment_pin_status_response.rb -lib/fastcomments-client/models/change_ticket_state200_response.rb lib/fastcomments-client/models/change_ticket_state_body.rb lib/fastcomments-client/models/change_ticket_state_response.rb lib/fastcomments-client/models/check_blocked_comments_response.rb -lib/fastcomments-client/models/checked_comments_for_blocked200_response.rb -lib/fastcomments-client/models/combine_comments_with_question_results200_response.rb lib/fastcomments-client/models/combine_question_results_with_comments_response.rb lib/fastcomments-client/models/comment_data.rb lib/fastcomments-client/models/comment_html_rendering_mode.rb @@ -450,56 +469,42 @@ lib/fastcomments-client/models/comment_user_badge_info.rb lib/fastcomments-client/models/comment_user_hash_tag_info.rb lib/fastcomments-client/models/comment_user_mention_info.rb lib/fastcomments-client/models/commenter_name_formats.rb +lib/fastcomments-client/models/comments_by_ids_params.rb lib/fastcomments-client/models/create_api_page_data.rb lib/fastcomments-client/models/create_api_user_subscription_data.rb lib/fastcomments-client/models/create_apisso_user_data.rb lib/fastcomments-client/models/create_comment_params.rb -lib/fastcomments-client/models/create_comment_public200_response.rb -lib/fastcomments-client/models/create_email_template200_response.rb lib/fastcomments-client/models/create_email_template_body.rb lib/fastcomments-client/models/create_email_template_response.rb -lib/fastcomments-client/models/create_feed_post200_response.rb lib/fastcomments-client/models/create_feed_post_params.rb -lib/fastcomments-client/models/create_feed_post_public200_response.rb lib/fastcomments-client/models/create_feed_post_response.rb lib/fastcomments-client/models/create_feed_posts_response.rb lib/fastcomments-client/models/create_hash_tag_body.rb lib/fastcomments-client/models/create_hash_tag_response.rb -lib/fastcomments-client/models/create_moderator200_response.rb lib/fastcomments-client/models/create_moderator_body.rb lib/fastcomments-client/models/create_moderator_response.rb -lib/fastcomments-client/models/create_question_config200_response.rb lib/fastcomments-client/models/create_question_config_body.rb lib/fastcomments-client/models/create_question_config_response.rb -lib/fastcomments-client/models/create_question_result200_response.rb lib/fastcomments-client/models/create_question_result_body.rb lib/fastcomments-client/models/create_question_result_response.rb lib/fastcomments-client/models/create_subscription_api_response.rb -lib/fastcomments-client/models/create_tenant200_response.rb lib/fastcomments-client/models/create_tenant_body.rb -lib/fastcomments-client/models/create_tenant_package200_response.rb lib/fastcomments-client/models/create_tenant_package_body.rb lib/fastcomments-client/models/create_tenant_package_response.rb lib/fastcomments-client/models/create_tenant_response.rb -lib/fastcomments-client/models/create_tenant_user200_response.rb lib/fastcomments-client/models/create_tenant_user_body.rb lib/fastcomments-client/models/create_tenant_user_response.rb -lib/fastcomments-client/models/create_ticket200_response.rb lib/fastcomments-client/models/create_ticket_body.rb lib/fastcomments-client/models/create_ticket_response.rb -lib/fastcomments-client/models/create_user_badge200_response.rb lib/fastcomments-client/models/create_user_badge_params.rb +lib/fastcomments-client/models/create_v1_page_react.rb lib/fastcomments-client/models/custom_config_parameters.rb lib/fastcomments-client/models/custom_email_template.rb -lib/fastcomments-client/models/delete_comment200_response.rb lib/fastcomments-client/models/delete_comment_action.rb -lib/fastcomments-client/models/delete_comment_public200_response.rb lib/fastcomments-client/models/delete_comment_result.rb -lib/fastcomments-client/models/delete_comment_vote200_response.rb -lib/fastcomments-client/models/delete_domain_config200_response.rb -lib/fastcomments-client/models/delete_feed_post_public200_response.rb -lib/fastcomments-client/models/delete_feed_post_public200_response_any_of.rb -lib/fastcomments-client/models/delete_hash_tag_request.rb +lib/fastcomments-client/models/delete_domain_config_response.rb +lib/fastcomments-client/models/delete_feed_post_public_response.rb +lib/fastcomments-client/models/delete_hash_tag_request_body.rb lib/fastcomments-client/models/delete_page_api_response.rb lib/fastcomments-client/models/delete_sso_user_api_response.rb lib/fastcomments-client/models/delete_subscription_api_response.rb @@ -518,126 +523,124 @@ lib/fastcomments-client/models/feed_post_stats.rb lib/fastcomments-client/models/feed_posts_stats_response.rb lib/fastcomments-client/models/find_comments_by_range_item.rb lib/fastcomments-client/models/find_comments_by_range_response.rb -lib/fastcomments-client/models/flag_comment200_response.rb -lib/fastcomments-client/models/flag_comment_public200_response.rb lib/fastcomments-client/models/flag_comment_response.rb -lib/fastcomments-client/models/get_audit_logs200_response.rb lib/fastcomments-client/models/get_audit_logs_response.rb -lib/fastcomments-client/models/get_cached_notification_count200_response.rb +lib/fastcomments-client/models/get_banned_users_count_response.rb +lib/fastcomments-client/models/get_banned_users_from_comment_response.rb lib/fastcomments-client/models/get_cached_notification_count_response.rb -lib/fastcomments-client/models/get_comment200_response.rb -lib/fastcomments-client/models/get_comment_text200_response.rb -lib/fastcomments-client/models/get_comment_vote_user_names200_response.rb +lib/fastcomments-client/models/get_comment_ban_status_response.rb +lib/fastcomments-client/models/get_comment_text_response.rb lib/fastcomments-client/models/get_comment_vote_user_names_success_response.rb -lib/fastcomments-client/models/get_comments200_response.rb -lib/fastcomments-client/models/get_comments_public200_response.rb +lib/fastcomments-client/models/get_comments_for_user_response.rb lib/fastcomments-client/models/get_comments_response_public_comment.rb lib/fastcomments-client/models/get_comments_response_with_presence_public_comment.rb -lib/fastcomments-client/models/get_domain_config200_response.rb -lib/fastcomments-client/models/get_domain_configs200_response.rb -lib/fastcomments-client/models/get_domain_configs200_response_any_of.rb -lib/fastcomments-client/models/get_domain_configs200_response_any_of1.rb -lib/fastcomments-client/models/get_email_template200_response.rb -lib/fastcomments-client/models/get_email_template_definitions200_response.rb +lib/fastcomments-client/models/get_domain_config_response.rb +lib/fastcomments-client/models/get_domain_configs_response.rb +lib/fastcomments-client/models/get_domain_configs_response_any_of.rb +lib/fastcomments-client/models/get_domain_configs_response_any_of1.rb lib/fastcomments-client/models/get_email_template_definitions_response.rb -lib/fastcomments-client/models/get_email_template_render_errors200_response.rb lib/fastcomments-client/models/get_email_template_render_errors_response.rb lib/fastcomments-client/models/get_email_template_response.rb -lib/fastcomments-client/models/get_email_templates200_response.rb lib/fastcomments-client/models/get_email_templates_response.rb -lib/fastcomments-client/models/get_event_log200_response.rb lib/fastcomments-client/models/get_event_log_response.rb -lib/fastcomments-client/models/get_feed_posts200_response.rb -lib/fastcomments-client/models/get_feed_posts_public200_response.rb lib/fastcomments-client/models/get_feed_posts_response.rb -lib/fastcomments-client/models/get_feed_posts_stats200_response.rb -lib/fastcomments-client/models/get_hash_tags200_response.rb +lib/fastcomments-client/models/get_gifs_search_response.rb +lib/fastcomments-client/models/get_gifs_trending_response.rb lib/fastcomments-client/models/get_hash_tags_response.rb -lib/fastcomments-client/models/get_moderator200_response.rb lib/fastcomments-client/models/get_moderator_response.rb -lib/fastcomments-client/models/get_moderators200_response.rb lib/fastcomments-client/models/get_moderators_response.rb lib/fastcomments-client/models/get_my_notifications_response.rb -lib/fastcomments-client/models/get_notification_count200_response.rb lib/fastcomments-client/models/get_notification_count_response.rb -lib/fastcomments-client/models/get_notifications200_response.rb lib/fastcomments-client/models/get_notifications_response.rb lib/fastcomments-client/models/get_page_by_urlid_api_response.rb lib/fastcomments-client/models/get_pages_api_response.rb -lib/fastcomments-client/models/get_pending_webhook_event_count200_response.rb lib/fastcomments-client/models/get_pending_webhook_event_count_response.rb -lib/fastcomments-client/models/get_pending_webhook_events200_response.rb lib/fastcomments-client/models/get_pending_webhook_events_response.rb lib/fastcomments-client/models/get_public_feed_posts_response.rb -lib/fastcomments-client/models/get_question_config200_response.rb +lib/fastcomments-client/models/get_public_pages_response.rb lib/fastcomments-client/models/get_question_config_response.rb -lib/fastcomments-client/models/get_question_configs200_response.rb lib/fastcomments-client/models/get_question_configs_response.rb -lib/fastcomments-client/models/get_question_result200_response.rb lib/fastcomments-client/models/get_question_result_response.rb -lib/fastcomments-client/models/get_question_results200_response.rb lib/fastcomments-client/models/get_question_results_response.rb lib/fastcomments-client/models/get_sso_user_by_email_api_response.rb lib/fastcomments-client/models/get_sso_user_by_id_api_response.rb -lib/fastcomments-client/models/get_sso_users200_response.rb +lib/fastcomments-client/models/get_sso_users_response.rb lib/fastcomments-client/models/get_subscriptions_api_response.rb -lib/fastcomments-client/models/get_tenant200_response.rb -lib/fastcomments-client/models/get_tenant_daily_usages200_response.rb lib/fastcomments-client/models/get_tenant_daily_usages_response.rb -lib/fastcomments-client/models/get_tenant_package200_response.rb +lib/fastcomments-client/models/get_tenant_manual_badges_response.rb lib/fastcomments-client/models/get_tenant_package_response.rb -lib/fastcomments-client/models/get_tenant_packages200_response.rb lib/fastcomments-client/models/get_tenant_packages_response.rb lib/fastcomments-client/models/get_tenant_response.rb -lib/fastcomments-client/models/get_tenant_user200_response.rb lib/fastcomments-client/models/get_tenant_user_response.rb -lib/fastcomments-client/models/get_tenant_users200_response.rb lib/fastcomments-client/models/get_tenant_users_response.rb -lib/fastcomments-client/models/get_tenants200_response.rb lib/fastcomments-client/models/get_tenants_response.rb -lib/fastcomments-client/models/get_ticket200_response.rb lib/fastcomments-client/models/get_ticket_response.rb -lib/fastcomments-client/models/get_tickets200_response.rb lib/fastcomments-client/models/get_tickets_response.rb -lib/fastcomments-client/models/get_user200_response.rb -lib/fastcomments-client/models/get_user_badge200_response.rb -lib/fastcomments-client/models/get_user_badge_progress_by_id200_response.rb -lib/fastcomments-client/models/get_user_badge_progress_list200_response.rb -lib/fastcomments-client/models/get_user_badges200_response.rb -lib/fastcomments-client/models/get_user_notification_count200_response.rb +lib/fastcomments-client/models/get_translations_response.rb +lib/fastcomments-client/models/get_user_internal_profile_response.rb +lib/fastcomments-client/models/get_user_internal_profile_response_profile.rb +lib/fastcomments-client/models/get_user_manual_badges_response.rb lib/fastcomments-client/models/get_user_notification_count_response.rb -lib/fastcomments-client/models/get_user_notifications200_response.rb -lib/fastcomments-client/models/get_user_presence_statuses200_response.rb lib/fastcomments-client/models/get_user_presence_statuses_response.rb -lib/fastcomments-client/models/get_user_reacts_public200_response.rb lib/fastcomments-client/models/get_user_response.rb -lib/fastcomments-client/models/get_votes200_response.rb -lib/fastcomments-client/models/get_votes_for_user200_response.rb +lib/fastcomments-client/models/get_user_trust_factor_response.rb +lib/fastcomments-client/models/get_v1_page_likes.rb +lib/fastcomments-client/models/get_v2_page_react_users_response.rb +lib/fastcomments-client/models/get_v2_page_reacts.rb lib/fastcomments-client/models/get_votes_for_user_response.rb lib/fastcomments-client/models/get_votes_response.rb +lib/fastcomments-client/models/gif_get_large_response.rb lib/fastcomments-client/models/gif_rating.rb +lib/fastcomments-client/models/gif_search_internal_error.rb +lib/fastcomments-client/models/gif_search_response.rb +lib/fastcomments-client/models/gif_search_response_images_inner_inner.rb lib/fastcomments-client/models/header_account_notification.rb lib/fastcomments-client/models/header_state.rb lib/fastcomments-client/models/ignored_response.rb lib/fastcomments-client/models/image_content_profanity_level.rb +lib/fastcomments-client/models/imported_agent_approval_notification_frequency.rb lib/fastcomments-client/models/imported_site_type.rb lib/fastcomments-client/models/live_event.rb lib/fastcomments-client/models/live_event_extra_info.rb lib/fastcomments-client/models/live_event_type.rb -lib/fastcomments-client/models/lock_comment200_response.rb lib/fastcomments-client/models/media_asset.rb lib/fastcomments-client/models/mention_auto_complete_mode.rb lib/fastcomments-client/models/meta_item.rb +lib/fastcomments-client/models/moderation_api_child_comments_response.rb +lib/fastcomments-client/models/moderation_api_comment.rb +lib/fastcomments-client/models/moderation_api_comment_log.rb +lib/fastcomments-client/models/moderation_api_comment_response.rb +lib/fastcomments-client/models/moderation_api_count_comments_response.rb +lib/fastcomments-client/models/moderation_api_get_comment_ids_response.rb +lib/fastcomments-client/models/moderation_api_get_comments_response.rb +lib/fastcomments-client/models/moderation_api_get_logs_response.rb +lib/fastcomments-client/models/moderation_comment_search_response.rb +lib/fastcomments-client/models/moderation_export_response.rb +lib/fastcomments-client/models/moderation_export_status_response.rb +lib/fastcomments-client/models/moderation_filter.rb +lib/fastcomments-client/models/moderation_page_search_projected.rb +lib/fastcomments-client/models/moderation_page_search_response.rb +lib/fastcomments-client/models/moderation_site_search_projected.rb +lib/fastcomments-client/models/moderation_site_search_response.rb +lib/fastcomments-client/models/moderation_suggest_response.rb +lib/fastcomments-client/models/moderation_user_search_projected.rb +lib/fastcomments-client/models/moderation_user_search_response.rb lib/fastcomments-client/models/moderator.rb lib/fastcomments-client/models/notification_and_count.rb lib/fastcomments-client/models/notification_object_type.rb lib/fastcomments-client/models/notification_type.rb +lib/fastcomments-client/models/page_user_entry.rb +lib/fastcomments-client/models/page_users_info_response.rb +lib/fastcomments-client/models/page_users_offline_response.rb +lib/fastcomments-client/models/page_users_online_response.rb +lib/fastcomments-client/models/pages_sort_by.rb lib/fastcomments-client/models/patch_domain_config_params.rb -lib/fastcomments-client/models/patch_hash_tag200_response.rb +lib/fastcomments-client/models/patch_domain_config_response.rb lib/fastcomments-client/models/patch_page_api_response.rb lib/fastcomments-client/models/patch_sso_user_api_response.rb lib/fastcomments-client/models/pending_comment_to_sync_outbound.rb -lib/fastcomments-client/models/pin_comment200_response.rb +lib/fastcomments-client/models/post_remove_comment_response.rb +lib/fastcomments-client/models/pre_ban_summary.rb lib/fastcomments-client/models/pub_sub_comment.rb lib/fastcomments-client/models/pub_sub_comment_base.rb lib/fastcomments-client/models/pub_sub_vote.rb @@ -648,7 +651,9 @@ lib/fastcomments-client/models/public_block_from_comment_params.rb lib/fastcomments-client/models/public_comment.rb lib/fastcomments-client/models/public_comment_base.rb lib/fastcomments-client/models/public_feed_posts_response.rb +lib/fastcomments-client/models/public_page.rb lib/fastcomments-client/models/public_vote.rb +lib/fastcomments-client/models/put_domain_config_response.rb lib/fastcomments-client/models/put_sso_user_api_response.rb lib/fastcomments-client/models/query_predicate.rb lib/fastcomments-client/models/query_predicate_value.rb @@ -661,11 +666,10 @@ lib/fastcomments-client/models/question_result_aggregation_overall.rb lib/fastcomments-client/models/question_sub_question_visibility.rb lib/fastcomments-client/models/question_when_save.rb lib/fastcomments-client/models/react_body_params.rb -lib/fastcomments-client/models/react_feed_post_public200_response.rb lib/fastcomments-client/models/react_feed_post_response.rb lib/fastcomments-client/models/record_string_before_string_or_null_after_string_or_null_value.rb -lib/fastcomments-client/models/record_string_string_or_number_value.rb -lib/fastcomments-client/models/render_email_template200_response.rb +lib/fastcomments-client/models/remove_comment_action_response.rb +lib/fastcomments-client/models/remove_user_badge_response.rb lib/fastcomments-client/models/render_email_template_body.rb lib/fastcomments-client/models/render_email_template_response.rb lib/fastcomments-client/models/renderable_user_notification.rb @@ -673,26 +677,27 @@ lib/fastcomments-client/models/repeat_comment_check_ignored_reason.rb lib/fastcomments-client/models/repeat_comment_handling_action.rb lib/fastcomments-client/models/replace_tenant_package_body.rb lib/fastcomments-client/models/replace_tenant_user_body.rb -lib/fastcomments-client/models/reset_user_notifications200_response.rb lib/fastcomments-client/models/reset_user_notifications_response.rb -lib/fastcomments-client/models/save_comment200_response.rb -lib/fastcomments-client/models/save_comment_response.rb lib/fastcomments-client/models/save_comment_response_optimized.rb +lib/fastcomments-client/models/save_comments_bulk_response.rb lib/fastcomments-client/models/save_comments_response_with_presence.rb -lib/fastcomments-client/models/search_users200_response.rb lib/fastcomments-client/models/search_users_response.rb +lib/fastcomments-client/models/search_users_result.rb lib/fastcomments-client/models/search_users_sectioned_response.rb -lib/fastcomments-client/models/set_comment_text200_response.rb +lib/fastcomments-client/models/set_comment_approved_response.rb +lib/fastcomments-client/models/set_comment_text_params.rb +lib/fastcomments-client/models/set_comment_text_response.rb lib/fastcomments-client/models/set_comment_text_result.rb +lib/fastcomments-client/models/set_user_trust_factor_response.rb lib/fastcomments-client/models/size_preset.rb lib/fastcomments-client/models/sort_directions.rb lib/fastcomments-client/models/sortdir.rb lib/fastcomments-client/models/spam_rule.rb lib/fastcomments-client/models/sso_security_level.rb +lib/fastcomments-client/models/tenant_badge.rb lib/fastcomments-client/models/tenant_hash_tag.rb lib/fastcomments-client/models/tenant_package.rb lib/fastcomments-client/models/tos_config.rb -lib/fastcomments-client/models/un_block_comment_public200_response.rb lib/fastcomments-client/models/un_block_from_comment_params.rb lib/fastcomments-client/models/unblock_success.rb lib/fastcomments-client/models/updatable_comment_params.rb @@ -712,9 +717,10 @@ lib/fastcomments-client/models/update_subscription_api_response.rb lib/fastcomments-client/models/update_tenant_body.rb lib/fastcomments-client/models/update_tenant_package_body.rb lib/fastcomments-client/models/update_tenant_user_body.rb -lib/fastcomments-client/models/update_user_badge200_response.rb lib/fastcomments-client/models/update_user_badge_params.rb -lib/fastcomments-client/models/update_user_notification_status200_response.rb +lib/fastcomments-client/models/update_user_notification_comment_subscription_status_response.rb +lib/fastcomments-client/models/update_user_notification_page_subscription_status_response.rb +lib/fastcomments-client/models/update_user_notification_status_response.rb lib/fastcomments-client/models/upload_image_response.rb lib/fastcomments-client/models/user.rb lib/fastcomments-client/models/user_badge.rb @@ -728,25 +734,28 @@ lib/fastcomments-client/models/user_search_result.rb lib/fastcomments-client/models/user_search_section.rb lib/fastcomments-client/models/user_search_section_result.rb lib/fastcomments-client/models/user_session_info.rb +lib/fastcomments-client/models/users_list_location.rb lib/fastcomments-client/models/vote_body_params.rb -lib/fastcomments-client/models/vote_comment200_response.rb lib/fastcomments-client/models/vote_delete_response.rb lib/fastcomments-client/models/vote_response.rb +lib/fastcomments-client/models/vote_response_status.rb lib/fastcomments-client/models/vote_response_user.rb lib/fastcomments-client/models/vote_style.rb lib/fastcomments-client/version.rb spec/api/default_api_spec.rb +spec/api/moderation_api_spec.rb spec/api/public_api_spec.rb -spec/models/add_domain_config200_response_any_of_spec.rb -spec/models/add_domain_config200_response_spec.rb spec/models/add_domain_config_params_spec.rb -spec/models/add_hash_tag200_response_spec.rb -spec/models/add_hash_tags_bulk200_response_spec.rb +spec/models/add_domain_config_response_any_of_spec.rb +spec/models/add_domain_config_response_spec.rb spec/models/add_page_api_response_spec.rb spec/models/add_sso_user_api_response_spec.rb -spec/models/aggregate_question_results200_response_spec.rb +spec/models/adjust_comment_votes_params_spec.rb +spec/models/adjust_votes_response_spec.rb spec/models/aggregate_question_results_response_spec.rb +spec/models/aggregate_response_spec.rb spec/models/aggregate_time_bucket_spec.rb +spec/models/aggregation_api_error_spec.rb spec/models/aggregation_item_spec.rb spec/models/aggregation_op_type_spec.rb spec/models/aggregation_operation_spec.rb @@ -756,8 +765,13 @@ spec/models/aggregation_response_spec.rb spec/models/aggregation_response_stats_spec.rb spec/models/aggregation_value_spec.rb spec/models/api_audit_log_spec.rb +spec/models/api_ban_user_change_log_spec.rb +spec/models/api_ban_user_changed_values_spec.rb +spec/models/api_banned_user_spec.rb +spec/models/api_banned_user_with_multi_match_info_spec.rb spec/models/api_comment_base_meta_spec.rb spec/models/api_comment_base_spec.rb +spec/models/api_comment_common_banned_user_spec.rb spec/models/api_comment_spec.rb spec/models/api_create_user_badge_response_spec.rb spec/models/api_domain_configuration_spec.rb @@ -770,7 +784,10 @@ spec/models/api_get_user_badge_progress_list_response_spec.rb spec/models/api_get_user_badge_progress_response_spec.rb spec/models/api_get_user_badge_response_spec.rb spec/models/api_get_user_badges_response_spec.rb +spec/models/api_moderate_get_user_ban_preferences_response_spec.rb +spec/models/api_moderate_user_ban_preferences_spec.rb spec/models/api_page_spec.rb +spec/models/api_save_comment_response_spec.rb spec/models/api_status_spec.rb spec/models/api_tenant_daily_usage_spec.rb spec/models/api_tenant_spec.rb @@ -779,24 +796,30 @@ spec/models/api_ticket_file_spec.rb spec/models/api_ticket_spec.rb spec/models/api_user_subscription_spec.rb spec/models/apisso_user_spec.rb +spec/models/award_user_badge_response_spec.rb +spec/models/ban_user_from_comment_result_spec.rb +spec/models/ban_user_undo_params_spec.rb +spec/models/banned_user_match_matched_on_value_spec.rb +spec/models/banned_user_match_spec.rb +spec/models/banned_user_match_type_spec.rb spec/models/billing_info_spec.rb spec/models/block_from_comment_params_spec.rb -spec/models/block_from_comment_public200_response_spec.rb spec/models/block_success_spec.rb +spec/models/build_moderation_filter_params_spec.rb +spec/models/build_moderation_filter_response_spec.rb spec/models/bulk_aggregate_question_item_spec.rb -spec/models/bulk_aggregate_question_results200_response_spec.rb spec/models/bulk_aggregate_question_results_request_spec.rb spec/models/bulk_aggregate_question_results_response_spec.rb spec/models/bulk_create_hash_tags_body_spec.rb spec/models/bulk_create_hash_tags_body_tags_inner_spec.rb +spec/models/bulk_create_hash_tags_response_results_inner_spec.rb spec/models/bulk_create_hash_tags_response_spec.rb +spec/models/bulk_pre_ban_params_spec.rb +spec/models/bulk_pre_ban_summary_spec.rb spec/models/change_comment_pin_status_response_spec.rb -spec/models/change_ticket_state200_response_spec.rb spec/models/change_ticket_state_body_spec.rb spec/models/change_ticket_state_response_spec.rb spec/models/check_blocked_comments_response_spec.rb -spec/models/checked_comments_for_blocked200_response_spec.rb -spec/models/combine_comments_with_question_results200_response_spec.rb spec/models/combine_question_results_with_comments_response_spec.rb spec/models/comment_data_spec.rb spec/models/comment_html_rendering_mode_spec.rb @@ -811,56 +834,42 @@ spec/models/comment_user_badge_info_spec.rb spec/models/comment_user_hash_tag_info_spec.rb spec/models/comment_user_mention_info_spec.rb spec/models/commenter_name_formats_spec.rb +spec/models/comments_by_ids_params_spec.rb spec/models/create_api_page_data_spec.rb spec/models/create_api_user_subscription_data_spec.rb spec/models/create_apisso_user_data_spec.rb spec/models/create_comment_params_spec.rb -spec/models/create_comment_public200_response_spec.rb -spec/models/create_email_template200_response_spec.rb spec/models/create_email_template_body_spec.rb spec/models/create_email_template_response_spec.rb -spec/models/create_feed_post200_response_spec.rb spec/models/create_feed_post_params_spec.rb -spec/models/create_feed_post_public200_response_spec.rb spec/models/create_feed_post_response_spec.rb spec/models/create_feed_posts_response_spec.rb spec/models/create_hash_tag_body_spec.rb spec/models/create_hash_tag_response_spec.rb -spec/models/create_moderator200_response_spec.rb spec/models/create_moderator_body_spec.rb spec/models/create_moderator_response_spec.rb -spec/models/create_question_config200_response_spec.rb spec/models/create_question_config_body_spec.rb spec/models/create_question_config_response_spec.rb -spec/models/create_question_result200_response_spec.rb spec/models/create_question_result_body_spec.rb spec/models/create_question_result_response_spec.rb spec/models/create_subscription_api_response_spec.rb -spec/models/create_tenant200_response_spec.rb spec/models/create_tenant_body_spec.rb -spec/models/create_tenant_package200_response_spec.rb spec/models/create_tenant_package_body_spec.rb spec/models/create_tenant_package_response_spec.rb spec/models/create_tenant_response_spec.rb -spec/models/create_tenant_user200_response_spec.rb spec/models/create_tenant_user_body_spec.rb spec/models/create_tenant_user_response_spec.rb -spec/models/create_ticket200_response_spec.rb spec/models/create_ticket_body_spec.rb spec/models/create_ticket_response_spec.rb -spec/models/create_user_badge200_response_spec.rb spec/models/create_user_badge_params_spec.rb +spec/models/create_v1_page_react_spec.rb spec/models/custom_config_parameters_spec.rb spec/models/custom_email_template_spec.rb -spec/models/delete_comment200_response_spec.rb spec/models/delete_comment_action_spec.rb -spec/models/delete_comment_public200_response_spec.rb spec/models/delete_comment_result_spec.rb -spec/models/delete_comment_vote200_response_spec.rb -spec/models/delete_domain_config200_response_spec.rb -spec/models/delete_feed_post_public200_response_any_of_spec.rb -spec/models/delete_feed_post_public200_response_spec.rb -spec/models/delete_hash_tag_request_spec.rb +spec/models/delete_domain_config_response_spec.rb +spec/models/delete_feed_post_public_response_spec.rb +spec/models/delete_hash_tag_request_body_spec.rb spec/models/delete_page_api_response_spec.rb spec/models/delete_sso_user_api_response_spec.rb spec/models/delete_subscription_api_response_spec.rb @@ -879,126 +888,124 @@ spec/models/feed_post_stats_spec.rb spec/models/feed_posts_stats_response_spec.rb spec/models/find_comments_by_range_item_spec.rb spec/models/find_comments_by_range_response_spec.rb -spec/models/flag_comment200_response_spec.rb -spec/models/flag_comment_public200_response_spec.rb spec/models/flag_comment_response_spec.rb -spec/models/get_audit_logs200_response_spec.rb spec/models/get_audit_logs_response_spec.rb -spec/models/get_cached_notification_count200_response_spec.rb +spec/models/get_banned_users_count_response_spec.rb +spec/models/get_banned_users_from_comment_response_spec.rb spec/models/get_cached_notification_count_response_spec.rb -spec/models/get_comment200_response_spec.rb -spec/models/get_comment_text200_response_spec.rb -spec/models/get_comment_vote_user_names200_response_spec.rb +spec/models/get_comment_ban_status_response_spec.rb +spec/models/get_comment_text_response_spec.rb spec/models/get_comment_vote_user_names_success_response_spec.rb -spec/models/get_comments200_response_spec.rb -spec/models/get_comments_public200_response_spec.rb +spec/models/get_comments_for_user_response_spec.rb spec/models/get_comments_response_public_comment_spec.rb spec/models/get_comments_response_with_presence_public_comment_spec.rb -spec/models/get_domain_config200_response_spec.rb -spec/models/get_domain_configs200_response_any_of1_spec.rb -spec/models/get_domain_configs200_response_any_of_spec.rb -spec/models/get_domain_configs200_response_spec.rb -spec/models/get_email_template200_response_spec.rb -spec/models/get_email_template_definitions200_response_spec.rb +spec/models/get_domain_config_response_spec.rb +spec/models/get_domain_configs_response_any_of1_spec.rb +spec/models/get_domain_configs_response_any_of_spec.rb +spec/models/get_domain_configs_response_spec.rb spec/models/get_email_template_definitions_response_spec.rb -spec/models/get_email_template_render_errors200_response_spec.rb spec/models/get_email_template_render_errors_response_spec.rb spec/models/get_email_template_response_spec.rb -spec/models/get_email_templates200_response_spec.rb spec/models/get_email_templates_response_spec.rb -spec/models/get_event_log200_response_spec.rb spec/models/get_event_log_response_spec.rb -spec/models/get_feed_posts200_response_spec.rb -spec/models/get_feed_posts_public200_response_spec.rb spec/models/get_feed_posts_response_spec.rb -spec/models/get_feed_posts_stats200_response_spec.rb -spec/models/get_hash_tags200_response_spec.rb +spec/models/get_gifs_search_response_spec.rb +spec/models/get_gifs_trending_response_spec.rb spec/models/get_hash_tags_response_spec.rb -spec/models/get_moderator200_response_spec.rb spec/models/get_moderator_response_spec.rb -spec/models/get_moderators200_response_spec.rb spec/models/get_moderators_response_spec.rb spec/models/get_my_notifications_response_spec.rb -spec/models/get_notification_count200_response_spec.rb spec/models/get_notification_count_response_spec.rb -spec/models/get_notifications200_response_spec.rb spec/models/get_notifications_response_spec.rb spec/models/get_page_by_urlid_api_response_spec.rb spec/models/get_pages_api_response_spec.rb -spec/models/get_pending_webhook_event_count200_response_spec.rb spec/models/get_pending_webhook_event_count_response_spec.rb -spec/models/get_pending_webhook_events200_response_spec.rb spec/models/get_pending_webhook_events_response_spec.rb spec/models/get_public_feed_posts_response_spec.rb -spec/models/get_question_config200_response_spec.rb +spec/models/get_public_pages_response_spec.rb spec/models/get_question_config_response_spec.rb -spec/models/get_question_configs200_response_spec.rb spec/models/get_question_configs_response_spec.rb -spec/models/get_question_result200_response_spec.rb spec/models/get_question_result_response_spec.rb -spec/models/get_question_results200_response_spec.rb spec/models/get_question_results_response_spec.rb spec/models/get_sso_user_by_email_api_response_spec.rb spec/models/get_sso_user_by_id_api_response_spec.rb -spec/models/get_sso_users200_response_spec.rb +spec/models/get_sso_users_response_spec.rb spec/models/get_subscriptions_api_response_spec.rb -spec/models/get_tenant200_response_spec.rb -spec/models/get_tenant_daily_usages200_response_spec.rb spec/models/get_tenant_daily_usages_response_spec.rb -spec/models/get_tenant_package200_response_spec.rb +spec/models/get_tenant_manual_badges_response_spec.rb spec/models/get_tenant_package_response_spec.rb -spec/models/get_tenant_packages200_response_spec.rb spec/models/get_tenant_packages_response_spec.rb spec/models/get_tenant_response_spec.rb -spec/models/get_tenant_user200_response_spec.rb spec/models/get_tenant_user_response_spec.rb -spec/models/get_tenant_users200_response_spec.rb spec/models/get_tenant_users_response_spec.rb -spec/models/get_tenants200_response_spec.rb spec/models/get_tenants_response_spec.rb -spec/models/get_ticket200_response_spec.rb spec/models/get_ticket_response_spec.rb -spec/models/get_tickets200_response_spec.rb spec/models/get_tickets_response_spec.rb -spec/models/get_user200_response_spec.rb -spec/models/get_user_badge200_response_spec.rb -spec/models/get_user_badge_progress_by_id200_response_spec.rb -spec/models/get_user_badge_progress_list200_response_spec.rb -spec/models/get_user_badges200_response_spec.rb -spec/models/get_user_notification_count200_response_spec.rb +spec/models/get_translations_response_spec.rb +spec/models/get_user_internal_profile_response_profile_spec.rb +spec/models/get_user_internal_profile_response_spec.rb +spec/models/get_user_manual_badges_response_spec.rb spec/models/get_user_notification_count_response_spec.rb -spec/models/get_user_notifications200_response_spec.rb -spec/models/get_user_presence_statuses200_response_spec.rb spec/models/get_user_presence_statuses_response_spec.rb -spec/models/get_user_reacts_public200_response_spec.rb spec/models/get_user_response_spec.rb -spec/models/get_votes200_response_spec.rb -spec/models/get_votes_for_user200_response_spec.rb +spec/models/get_user_trust_factor_response_spec.rb +spec/models/get_v1_page_likes_spec.rb +spec/models/get_v2_page_react_users_response_spec.rb +spec/models/get_v2_page_reacts_spec.rb spec/models/get_votes_for_user_response_spec.rb spec/models/get_votes_response_spec.rb +spec/models/gif_get_large_response_spec.rb spec/models/gif_rating_spec.rb +spec/models/gif_search_internal_error_spec.rb +spec/models/gif_search_response_images_inner_inner_spec.rb +spec/models/gif_search_response_spec.rb spec/models/header_account_notification_spec.rb spec/models/header_state_spec.rb spec/models/ignored_response_spec.rb spec/models/image_content_profanity_level_spec.rb +spec/models/imported_agent_approval_notification_frequency_spec.rb spec/models/imported_site_type_spec.rb spec/models/live_event_extra_info_spec.rb spec/models/live_event_spec.rb spec/models/live_event_type_spec.rb -spec/models/lock_comment200_response_spec.rb spec/models/media_asset_spec.rb spec/models/mention_auto_complete_mode_spec.rb spec/models/meta_item_spec.rb +spec/models/moderation_api_child_comments_response_spec.rb +spec/models/moderation_api_comment_log_spec.rb +spec/models/moderation_api_comment_response_spec.rb +spec/models/moderation_api_comment_spec.rb +spec/models/moderation_api_count_comments_response_spec.rb +spec/models/moderation_api_get_comment_ids_response_spec.rb +spec/models/moderation_api_get_comments_response_spec.rb +spec/models/moderation_api_get_logs_response_spec.rb +spec/models/moderation_comment_search_response_spec.rb +spec/models/moderation_export_response_spec.rb +spec/models/moderation_export_status_response_spec.rb +spec/models/moderation_filter_spec.rb +spec/models/moderation_page_search_projected_spec.rb +spec/models/moderation_page_search_response_spec.rb +spec/models/moderation_site_search_projected_spec.rb +spec/models/moderation_site_search_response_spec.rb +spec/models/moderation_suggest_response_spec.rb +spec/models/moderation_user_search_projected_spec.rb +spec/models/moderation_user_search_response_spec.rb spec/models/moderator_spec.rb spec/models/notification_and_count_spec.rb spec/models/notification_object_type_spec.rb spec/models/notification_type_spec.rb +spec/models/page_user_entry_spec.rb +spec/models/page_users_info_response_spec.rb +spec/models/page_users_offline_response_spec.rb +spec/models/page_users_online_response_spec.rb +spec/models/pages_sort_by_spec.rb spec/models/patch_domain_config_params_spec.rb -spec/models/patch_hash_tag200_response_spec.rb +spec/models/patch_domain_config_response_spec.rb spec/models/patch_page_api_response_spec.rb spec/models/patch_sso_user_api_response_spec.rb spec/models/pending_comment_to_sync_outbound_spec.rb -spec/models/pin_comment200_response_spec.rb +spec/models/post_remove_comment_response_spec.rb +spec/models/pre_ban_summary_spec.rb spec/models/pub_sub_comment_base_spec.rb spec/models/pub_sub_comment_spec.rb spec/models/pub_sub_vote_spec.rb @@ -1009,7 +1016,9 @@ spec/models/public_block_from_comment_params_spec.rb spec/models/public_comment_base_spec.rb spec/models/public_comment_spec.rb spec/models/public_feed_posts_response_spec.rb +spec/models/public_page_spec.rb spec/models/public_vote_spec.rb +spec/models/put_domain_config_response_spec.rb spec/models/put_sso_user_api_response_spec.rb spec/models/query_predicate_spec.rb spec/models/query_predicate_value_spec.rb @@ -1022,11 +1031,10 @@ spec/models/question_result_spec.rb spec/models/question_sub_question_visibility_spec.rb spec/models/question_when_save_spec.rb spec/models/react_body_params_spec.rb -spec/models/react_feed_post_public200_response_spec.rb spec/models/react_feed_post_response_spec.rb spec/models/record_string_before_string_or_null_after_string_or_null_value_spec.rb -spec/models/record_string_string_or_number_value_spec.rb -spec/models/render_email_template200_response_spec.rb +spec/models/remove_comment_action_response_spec.rb +spec/models/remove_user_badge_response_spec.rb spec/models/render_email_template_body_spec.rb spec/models/render_email_template_response_spec.rb spec/models/renderable_user_notification_spec.rb @@ -1034,26 +1042,27 @@ spec/models/repeat_comment_check_ignored_reason_spec.rb spec/models/repeat_comment_handling_action_spec.rb spec/models/replace_tenant_package_body_spec.rb spec/models/replace_tenant_user_body_spec.rb -spec/models/reset_user_notifications200_response_spec.rb spec/models/reset_user_notifications_response_spec.rb -spec/models/save_comment200_response_spec.rb spec/models/save_comment_response_optimized_spec.rb -spec/models/save_comment_response_spec.rb +spec/models/save_comments_bulk_response_spec.rb spec/models/save_comments_response_with_presence_spec.rb -spec/models/search_users200_response_spec.rb spec/models/search_users_response_spec.rb +spec/models/search_users_result_spec.rb spec/models/search_users_sectioned_response_spec.rb -spec/models/set_comment_text200_response_spec.rb +spec/models/set_comment_approved_response_spec.rb +spec/models/set_comment_text_params_spec.rb +spec/models/set_comment_text_response_spec.rb spec/models/set_comment_text_result_spec.rb +spec/models/set_user_trust_factor_response_spec.rb spec/models/size_preset_spec.rb spec/models/sort_directions_spec.rb spec/models/sortdir_spec.rb spec/models/spam_rule_spec.rb spec/models/sso_security_level_spec.rb +spec/models/tenant_badge_spec.rb spec/models/tenant_hash_tag_spec.rb spec/models/tenant_package_spec.rb spec/models/tos_config_spec.rb -spec/models/un_block_comment_public200_response_spec.rb spec/models/un_block_from_comment_params_spec.rb spec/models/unblock_success_spec.rb spec/models/updatable_comment_params_spec.rb @@ -1073,9 +1082,10 @@ spec/models/update_subscription_api_response_spec.rb spec/models/update_tenant_body_spec.rb spec/models/update_tenant_package_body_spec.rb spec/models/update_tenant_user_body_spec.rb -spec/models/update_user_badge200_response_spec.rb spec/models/update_user_badge_params_spec.rb -spec/models/update_user_notification_status200_response_spec.rb +spec/models/update_user_notification_comment_subscription_status_response_spec.rb +spec/models/update_user_notification_page_subscription_status_response_spec.rb +spec/models/update_user_notification_status_response_spec.rb spec/models/upload_image_response_spec.rb spec/models/user_badge_progress_spec.rb spec/models/user_badge_spec.rb @@ -1089,10 +1099,11 @@ spec/models/user_search_section_result_spec.rb spec/models/user_search_section_spec.rb spec/models/user_session_info_spec.rb spec/models/user_spec.rb +spec/models/users_list_location_spec.rb spec/models/vote_body_params_spec.rb -spec/models/vote_comment200_response_spec.rb spec/models/vote_delete_response_spec.rb spec/models/vote_response_spec.rb +spec/models/vote_response_status_spec.rb spec/models/vote_response_user_spec.rb spec/models/vote_style_spec.rb spec/spec_helper.rb diff --git a/client/.openapi-generator/VERSION b/client/.openapi-generator/VERSION index 909dcd0..e465da4 100644 --- a/client/.openapi-generator/VERSION +++ b/client/.openapi-generator/VERSION @@ -1 +1 @@ -7.19.0-SNAPSHOT +7.14.0 diff --git a/client/.travis.yml b/client/.travis.yml index 68c41ae..a643c47 100644 --- a/client/.travis.yml +++ b/client/.travis.yml @@ -8,4 +8,4 @@ script: - bundle install --path vendor/bundle - bundle exec rspec - gem build fastcomments-client.gemspec - - gem install ./fastcomments-client-1.2.0.gem + - gem install ./fastcomments-client-1.2.1.gem diff --git a/client/README.md b/client/README.md index 8b4c3d0..f05866d 100644 --- a/client/README.md +++ b/client/README.md @@ -7,8 +7,8 @@ No description provided (generated by Openapi Generator https://github.com/opena This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 0.0.0 -- Package version: 1.2.0 -- Generator version: 7.19.0-SNAPSHOT +- Package version: 1.2.1 +- Generator version: 7.14.0 - Build package: org.openapitools.codegen.languages.RubyClientCodegen ## Installation @@ -24,16 +24,16 @@ gem build fastcomments-client.gemspec Then either install the gem locally: ```shell -gem install ./fastcomments-client-1.2.0.gem +gem install ./fastcomments-client-1.2.1.gem ``` -(for development, run `gem install --dev ./fastcomments-client-1.2.0.gem` to install the development dependencies) +(for development, run `gem install --dev ./fastcomments-client-1.2.1.gem` to install the development dependencies) or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/). Finally add this to the Gemfile: - gem 'fastcomments-client', '~> 1.2.0' + gem 'fastcomments-client', '~> 1.2.1' ### Install from Git @@ -198,26 +198,86 @@ Class | Method | HTTP request | Description *FastCommentsClient::DefaultApi* | [**update_tenant_package**](docs/DefaultApi.md#update_tenant_package) | **PATCH** /api/v1/tenant-packages/{id} | *FastCommentsClient::DefaultApi* | [**update_tenant_user**](docs/DefaultApi.md#update_tenant_user) | **PATCH** /api/v1/tenant-users/{id} | *FastCommentsClient::DefaultApi* | [**update_user_badge**](docs/DefaultApi.md#update_user_badge) | **PUT** /api/v1/user-badges/{id} | +*FastCommentsClient::ModerationApi* | [**delete_moderation_vote**](docs/ModerationApi.md#delete_moderation_vote) | **DELETE** /auth/my-account/moderate-comments/vote/{commentId}/{voteId} | +*FastCommentsClient::ModerationApi* | [**get_api_comments**](docs/ModerationApi.md#get_api_comments) | **GET** /auth/my-account/moderate-comments/api/comments | +*FastCommentsClient::ModerationApi* | [**get_api_export_status**](docs/ModerationApi.md#get_api_export_status) | **GET** /auth/my-account/moderate-comments/api/export/status | +*FastCommentsClient::ModerationApi* | [**get_api_ids**](docs/ModerationApi.md#get_api_ids) | **GET** /auth/my-account/moderate-comments/api/ids | +*FastCommentsClient::ModerationApi* | [**get_ban_users_from_comment**](docs/ModerationApi.md#get_ban_users_from_comment) | **GET** /auth/my-account/moderate-comments/ban-users/from-comment/{commentId} | +*FastCommentsClient::ModerationApi* | [**get_comment_ban_status**](docs/ModerationApi.md#get_comment_ban_status) | **GET** /auth/my-account/moderate-comments/get-comment-ban-status/{commentId} | +*FastCommentsClient::ModerationApi* | [**get_comment_children**](docs/ModerationApi.md#get_comment_children) | **GET** /auth/my-account/moderate-comments/comment-children/{commentId} | +*FastCommentsClient::ModerationApi* | [**get_count**](docs/ModerationApi.md#get_count) | **GET** /auth/my-account/moderate-comments/count | +*FastCommentsClient::ModerationApi* | [**get_counts**](docs/ModerationApi.md#get_counts) | **GET** /auth/my-account/moderate-comments/banned-users/counts | +*FastCommentsClient::ModerationApi* | [**get_logs**](docs/ModerationApi.md#get_logs) | **GET** /auth/my-account/moderate-comments/logs/{commentId} | +*FastCommentsClient::ModerationApi* | [**get_manual_badges**](docs/ModerationApi.md#get_manual_badges) | **GET** /auth/my-account/moderate-comments/get-manual-badges | +*FastCommentsClient::ModerationApi* | [**get_manual_badges_for_user**](docs/ModerationApi.md#get_manual_badges_for_user) | **GET** /auth/my-account/moderate-comments/get-manual-badges-for-user | +*FastCommentsClient::ModerationApi* | [**get_moderation_comment**](docs/ModerationApi.md#get_moderation_comment) | **GET** /auth/my-account/moderate-comments/comment/{commentId} | +*FastCommentsClient::ModerationApi* | [**get_moderation_comment_text**](docs/ModerationApi.md#get_moderation_comment_text) | **GET** /auth/my-account/moderate-comments/get-comment-text/{commentId} | +*FastCommentsClient::ModerationApi* | [**get_pre_ban_summary**](docs/ModerationApi.md#get_pre_ban_summary) | **GET** /auth/my-account/moderate-comments/pre-ban-summary/{commentId} | +*FastCommentsClient::ModerationApi* | [**get_search_comments_summary**](docs/ModerationApi.md#get_search_comments_summary) | **GET** /auth/my-account/moderate-comments/search/comments/summary | +*FastCommentsClient::ModerationApi* | [**get_search_pages**](docs/ModerationApi.md#get_search_pages) | **GET** /auth/my-account/moderate-comments/search/pages | +*FastCommentsClient::ModerationApi* | [**get_search_sites**](docs/ModerationApi.md#get_search_sites) | **GET** /auth/my-account/moderate-comments/search/sites | +*FastCommentsClient::ModerationApi* | [**get_search_suggest**](docs/ModerationApi.md#get_search_suggest) | **GET** /auth/my-account/moderate-comments/search/suggest | +*FastCommentsClient::ModerationApi* | [**get_search_users**](docs/ModerationApi.md#get_search_users) | **GET** /auth/my-account/moderate-comments/search/users | +*FastCommentsClient::ModerationApi* | [**get_trust_factor**](docs/ModerationApi.md#get_trust_factor) | **GET** /auth/my-account/moderate-comments/get-trust-factor | +*FastCommentsClient::ModerationApi* | [**get_user_ban_preference**](docs/ModerationApi.md#get_user_ban_preference) | **GET** /auth/my-account/moderate-comments/user-ban-preference | +*FastCommentsClient::ModerationApi* | [**get_user_internal_profile**](docs/ModerationApi.md#get_user_internal_profile) | **GET** /auth/my-account/moderate-comments/get-user-internal-profile | +*FastCommentsClient::ModerationApi* | [**post_adjust_comment_votes**](docs/ModerationApi.md#post_adjust_comment_votes) | **POST** /auth/my-account/moderate-comments/adjust-comment-votes/{commentId} | +*FastCommentsClient::ModerationApi* | [**post_api_export**](docs/ModerationApi.md#post_api_export) | **POST** /auth/my-account/moderate-comments/api/export | +*FastCommentsClient::ModerationApi* | [**post_ban_user_from_comment**](docs/ModerationApi.md#post_ban_user_from_comment) | **POST** /auth/my-account/moderate-comments/ban-user/from-comment/{commentId} | +*FastCommentsClient::ModerationApi* | [**post_ban_user_undo**](docs/ModerationApi.md#post_ban_user_undo) | **POST** /auth/my-account/moderate-comments/ban-user/undo | +*FastCommentsClient::ModerationApi* | [**post_bulk_pre_ban_summary**](docs/ModerationApi.md#post_bulk_pre_ban_summary) | **POST** /auth/my-account/moderate-comments/bulk-pre-ban-summary | +*FastCommentsClient::ModerationApi* | [**post_comments_by_ids**](docs/ModerationApi.md#post_comments_by_ids) | **POST** /auth/my-account/moderate-comments/comments-by-ids | +*FastCommentsClient::ModerationApi* | [**post_flag_comment**](docs/ModerationApi.md#post_flag_comment) | **POST** /auth/my-account/moderate-comments/flag-comment/{commentId} | +*FastCommentsClient::ModerationApi* | [**post_remove_comment**](docs/ModerationApi.md#post_remove_comment) | **POST** /auth/my-account/moderate-comments/remove-comment/{commentId} | +*FastCommentsClient::ModerationApi* | [**post_restore_deleted_comment**](docs/ModerationApi.md#post_restore_deleted_comment) | **POST** /auth/my-account/moderate-comments/restore-deleted-comment/{commentId} | +*FastCommentsClient::ModerationApi* | [**post_set_comment_approval_status**](docs/ModerationApi.md#post_set_comment_approval_status) | **POST** /auth/my-account/moderate-comments/set-comment-approval-status/{commentId} | +*FastCommentsClient::ModerationApi* | [**post_set_comment_review_status**](docs/ModerationApi.md#post_set_comment_review_status) | **POST** /auth/my-account/moderate-comments/set-comment-review-status/{commentId} | +*FastCommentsClient::ModerationApi* | [**post_set_comment_spam_status**](docs/ModerationApi.md#post_set_comment_spam_status) | **POST** /auth/my-account/moderate-comments/set-comment-spam-status/{commentId} | +*FastCommentsClient::ModerationApi* | [**post_set_comment_text**](docs/ModerationApi.md#post_set_comment_text) | **POST** /auth/my-account/moderate-comments/set-comment-text/{commentId} | +*FastCommentsClient::ModerationApi* | [**post_un_flag_comment**](docs/ModerationApi.md#post_un_flag_comment) | **POST** /auth/my-account/moderate-comments/un-flag-comment/{commentId} | +*FastCommentsClient::ModerationApi* | [**post_vote**](docs/ModerationApi.md#post_vote) | **POST** /auth/my-account/moderate-comments/vote/{commentId} | +*FastCommentsClient::ModerationApi* | [**put_award_badge**](docs/ModerationApi.md#put_award_badge) | **PUT** /auth/my-account/moderate-comments/award-badge | +*FastCommentsClient::ModerationApi* | [**put_close_thread**](docs/ModerationApi.md#put_close_thread) | **PUT** /auth/my-account/moderate-comments/close-thread | +*FastCommentsClient::ModerationApi* | [**put_remove_badge**](docs/ModerationApi.md#put_remove_badge) | **PUT** /auth/my-account/moderate-comments/remove-badge | +*FastCommentsClient::ModerationApi* | [**put_reopen_thread**](docs/ModerationApi.md#put_reopen_thread) | **PUT** /auth/my-account/moderate-comments/reopen-thread | +*FastCommentsClient::ModerationApi* | [**set_trust_factor**](docs/ModerationApi.md#set_trust_factor) | **PUT** /auth/my-account/moderate-comments/set-trust-factor | *FastCommentsClient::PublicApi* | [**block_from_comment_public**](docs/PublicApi.md#block_from_comment_public) | **POST** /block-from-comment/{commentId} | *FastCommentsClient::PublicApi* | [**checked_comments_for_blocked**](docs/PublicApi.md#checked_comments_for_blocked) | **GET** /check-blocked-comments | *FastCommentsClient::PublicApi* | [**create_comment_public**](docs/PublicApi.md#create_comment_public) | **POST** /comments/{tenantId} | *FastCommentsClient::PublicApi* | [**create_feed_post_public**](docs/PublicApi.md#create_feed_post_public) | **POST** /feed-posts/{tenantId} | +*FastCommentsClient::PublicApi* | [**create_v1_page_react**](docs/PublicApi.md#create_v1_page_react) | **POST** /page-reacts/v1/likes/{tenantId} | +*FastCommentsClient::PublicApi* | [**create_v2_page_react**](docs/PublicApi.md#create_v2_page_react) | **POST** /page-reacts/v2/{tenantId} | *FastCommentsClient::PublicApi* | [**delete_comment_public**](docs/PublicApi.md#delete_comment_public) | **DELETE** /comments/{tenantId}/{commentId} | *FastCommentsClient::PublicApi* | [**delete_comment_vote**](docs/PublicApi.md#delete_comment_vote) | **DELETE** /comments/{tenantId}/{commentId}/vote/{voteId} | *FastCommentsClient::PublicApi* | [**delete_feed_post_public**](docs/PublicApi.md#delete_feed_post_public) | **DELETE** /feed-posts/{tenantId}/{postId} | +*FastCommentsClient::PublicApi* | [**delete_v1_page_react**](docs/PublicApi.md#delete_v1_page_react) | **DELETE** /page-reacts/v1/likes/{tenantId} | +*FastCommentsClient::PublicApi* | [**delete_v2_page_react**](docs/PublicApi.md#delete_v2_page_react) | **DELETE** /page-reacts/v2/{tenantId} | *FastCommentsClient::PublicApi* | [**flag_comment_public**](docs/PublicApi.md#flag_comment_public) | **POST** /flag-comment/{commentId} | *FastCommentsClient::PublicApi* | [**get_comment_text**](docs/PublicApi.md#get_comment_text) | **GET** /comments/{tenantId}/{commentId}/text | *FastCommentsClient::PublicApi* | [**get_comment_vote_user_names**](docs/PublicApi.md#get_comment_vote_user_names) | **GET** /comments/{tenantId}/{commentId}/votes | +*FastCommentsClient::PublicApi* | [**get_comments_for_user**](docs/PublicApi.md#get_comments_for_user) | **GET** /comments-for-user | *FastCommentsClient::PublicApi* | [**get_comments_public**](docs/PublicApi.md#get_comments_public) | **GET** /comments/{tenantId} | *FastCommentsClient::PublicApi* | [**get_event_log**](docs/PublicApi.md#get_event_log) | **GET** /event-log/{tenantId} | *FastCommentsClient::PublicApi* | [**get_feed_posts_public**](docs/PublicApi.md#get_feed_posts_public) | **GET** /feed-posts/{tenantId} | *FastCommentsClient::PublicApi* | [**get_feed_posts_stats**](docs/PublicApi.md#get_feed_posts_stats) | **GET** /feed-posts/{tenantId}/stats | +*FastCommentsClient::PublicApi* | [**get_gif_large**](docs/PublicApi.md#get_gif_large) | **GET** /gifs/get-large/{tenantId} | +*FastCommentsClient::PublicApi* | [**get_gifs_search**](docs/PublicApi.md#get_gifs_search) | **GET** /gifs/search/{tenantId} | +*FastCommentsClient::PublicApi* | [**get_gifs_trending**](docs/PublicApi.md#get_gifs_trending) | **GET** /gifs/trending/{tenantId} | *FastCommentsClient::PublicApi* | [**get_global_event_log**](docs/PublicApi.md#get_global_event_log) | **GET** /event-log/global/{tenantId} | +*FastCommentsClient::PublicApi* | [**get_offline_users**](docs/PublicApi.md#get_offline_users) | **GET** /pages/{tenantId}/users/offline | +*FastCommentsClient::PublicApi* | [**get_online_users**](docs/PublicApi.md#get_online_users) | **GET** /pages/{tenantId}/users/online | +*FastCommentsClient::PublicApi* | [**get_pages_public**](docs/PublicApi.md#get_pages_public) | **GET** /pages/{tenantId} | +*FastCommentsClient::PublicApi* | [**get_translations**](docs/PublicApi.md#get_translations) | **GET** /translations/{namespace}/{component} | *FastCommentsClient::PublicApi* | [**get_user_notification_count**](docs/PublicApi.md#get_user_notification_count) | **GET** /user-notifications/get-count | *FastCommentsClient::PublicApi* | [**get_user_notifications**](docs/PublicApi.md#get_user_notifications) | **GET** /user-notifications | *FastCommentsClient::PublicApi* | [**get_user_presence_statuses**](docs/PublicApi.md#get_user_presence_statuses) | **GET** /user-presence-status | *FastCommentsClient::PublicApi* | [**get_user_reacts_public**](docs/PublicApi.md#get_user_reacts_public) | **GET** /feed-posts/{tenantId}/user-reacts | +*FastCommentsClient::PublicApi* | [**get_users_info**](docs/PublicApi.md#get_users_info) | **GET** /pages/{tenantId}/users/info | +*FastCommentsClient::PublicApi* | [**get_v1_page_likes**](docs/PublicApi.md#get_v1_page_likes) | **GET** /page-reacts/v1/likes/{tenantId} | +*FastCommentsClient::PublicApi* | [**get_v2_page_react_users**](docs/PublicApi.md#get_v2_page_react_users) | **GET** /page-reacts/v2/{tenantId}/list | +*FastCommentsClient::PublicApi* | [**get_v2_page_reacts**](docs/PublicApi.md#get_v2_page_reacts) | **GET** /page-reacts/v2/{tenantId} | *FastCommentsClient::PublicApi* | [**lock_comment**](docs/PublicApi.md#lock_comment) | **POST** /comments/{tenantId}/{commentId}/lock | +*FastCommentsClient::PublicApi* | [**logout_public**](docs/PublicApi.md#logout_public) | **PUT** /auth/logout | *FastCommentsClient::PublicApi* | [**pin_comment**](docs/PublicApi.md#pin_comment) | **POST** /comments/{tenantId}/{commentId}/pin | *FastCommentsClient::PublicApi* | [**react_feed_post_public**](docs/PublicApi.md#react_feed_post_public) | **POST** /feed-posts/{tenantId}/react/{postId} | *FastCommentsClient::PublicApi* | [**reset_user_notification_count**](docs/PublicApi.md#reset_user_notification_count) | **POST** /user-notifications/reset-count | @@ -238,9 +298,14 @@ Class | Method | HTTP request | Description ## Documentation for Models - [FastCommentsClient::APIAuditLog](docs/APIAuditLog.md) + - [FastCommentsClient::APIBanUserChangeLog](docs/APIBanUserChangeLog.md) + - [FastCommentsClient::APIBanUserChangedValues](docs/APIBanUserChangedValues.md) + - [FastCommentsClient::APIBannedUser](docs/APIBannedUser.md) + - [FastCommentsClient::APIBannedUserWithMultiMatchInfo](docs/APIBannedUserWithMultiMatchInfo.md) - [FastCommentsClient::APIComment](docs/APIComment.md) - [FastCommentsClient::APICommentBase](docs/APICommentBase.md) - [FastCommentsClient::APICommentBaseMeta](docs/APICommentBaseMeta.md) + - [FastCommentsClient::APICommentCommonBannedUser](docs/APICommentCommonBannedUser.md) - [FastCommentsClient::APICreateUserBadgeResponse](docs/APICreateUserBadgeResponse.md) - [FastCommentsClient::APIDomainConfiguration](docs/APIDomainConfiguration.md) - [FastCommentsClient::APIEmptyResponse](docs/APIEmptyResponse.md) @@ -252,8 +317,11 @@ Class | Method | HTTP request | Description - [FastCommentsClient::APIGetUserBadgeProgressResponse](docs/APIGetUserBadgeProgressResponse.md) - [FastCommentsClient::APIGetUserBadgeResponse](docs/APIGetUserBadgeResponse.md) - [FastCommentsClient::APIGetUserBadgesResponse](docs/APIGetUserBadgesResponse.md) + - [FastCommentsClient::APIModerateGetUserBanPreferencesResponse](docs/APIModerateGetUserBanPreferencesResponse.md) + - [FastCommentsClient::APIModerateUserBanPreferences](docs/APIModerateUserBanPreferences.md) - [FastCommentsClient::APIPage](docs/APIPage.md) - [FastCommentsClient::APISSOUser](docs/APISSOUser.md) + - [FastCommentsClient::APISaveCommentResponse](docs/APISaveCommentResponse.md) - [FastCommentsClient::APIStatus](docs/APIStatus.md) - [FastCommentsClient::APITenant](docs/APITenant.md) - [FastCommentsClient::APITenantDailyUsage](docs/APITenantDailyUsage.md) @@ -261,16 +329,17 @@ Class | Method | HTTP request | Description - [FastCommentsClient::APITicketDetail](docs/APITicketDetail.md) - [FastCommentsClient::APITicketFile](docs/APITicketFile.md) - [FastCommentsClient::APIUserSubscription](docs/APIUserSubscription.md) - - [FastCommentsClient::AddDomainConfig200Response](docs/AddDomainConfig200Response.md) - - [FastCommentsClient::AddDomainConfig200ResponseAnyOf](docs/AddDomainConfig200ResponseAnyOf.md) - [FastCommentsClient::AddDomainConfigParams](docs/AddDomainConfigParams.md) - - [FastCommentsClient::AddHashTag200Response](docs/AddHashTag200Response.md) - - [FastCommentsClient::AddHashTagsBulk200Response](docs/AddHashTagsBulk200Response.md) + - [FastCommentsClient::AddDomainConfigResponse](docs/AddDomainConfigResponse.md) + - [FastCommentsClient::AddDomainConfigResponseAnyOf](docs/AddDomainConfigResponseAnyOf.md) - [FastCommentsClient::AddPageAPIResponse](docs/AddPageAPIResponse.md) - [FastCommentsClient::AddSSOUserAPIResponse](docs/AddSSOUserAPIResponse.md) - - [FastCommentsClient::AggregateQuestionResults200Response](docs/AggregateQuestionResults200Response.md) + - [FastCommentsClient::AdjustCommentVotesParams](docs/AdjustCommentVotesParams.md) + - [FastCommentsClient::AdjustVotesResponse](docs/AdjustVotesResponse.md) - [FastCommentsClient::AggregateQuestionResultsResponse](docs/AggregateQuestionResultsResponse.md) + - [FastCommentsClient::AggregateResponse](docs/AggregateResponse.md) - [FastCommentsClient::AggregateTimeBucket](docs/AggregateTimeBucket.md) + - [FastCommentsClient::AggregationAPIError](docs/AggregationAPIError.md) - [FastCommentsClient::AggregationItem](docs/AggregationItem.md) - [FastCommentsClient::AggregationOpType](docs/AggregationOpType.md) - [FastCommentsClient::AggregationOperation](docs/AggregationOperation.md) @@ -279,24 +348,30 @@ Class | Method | HTTP request | Description - [FastCommentsClient::AggregationResponse](docs/AggregationResponse.md) - [FastCommentsClient::AggregationResponseStats](docs/AggregationResponseStats.md) - [FastCommentsClient::AggregationValue](docs/AggregationValue.md) + - [FastCommentsClient::AwardUserBadgeResponse](docs/AwardUserBadgeResponse.md) + - [FastCommentsClient::BanUserFromCommentResult](docs/BanUserFromCommentResult.md) + - [FastCommentsClient::BanUserUndoParams](docs/BanUserUndoParams.md) + - [FastCommentsClient::BannedUserMatch](docs/BannedUserMatch.md) + - [FastCommentsClient::BannedUserMatchMatchedOnValue](docs/BannedUserMatchMatchedOnValue.md) + - [FastCommentsClient::BannedUserMatchType](docs/BannedUserMatchType.md) - [FastCommentsClient::BillingInfo](docs/BillingInfo.md) - [FastCommentsClient::BlockFromCommentParams](docs/BlockFromCommentParams.md) - - [FastCommentsClient::BlockFromCommentPublic200Response](docs/BlockFromCommentPublic200Response.md) - [FastCommentsClient::BlockSuccess](docs/BlockSuccess.md) + - [FastCommentsClient::BuildModerationFilterParams](docs/BuildModerationFilterParams.md) + - [FastCommentsClient::BuildModerationFilterResponse](docs/BuildModerationFilterResponse.md) - [FastCommentsClient::BulkAggregateQuestionItem](docs/BulkAggregateQuestionItem.md) - - [FastCommentsClient::BulkAggregateQuestionResults200Response](docs/BulkAggregateQuestionResults200Response.md) - [FastCommentsClient::BulkAggregateQuestionResultsRequest](docs/BulkAggregateQuestionResultsRequest.md) - [FastCommentsClient::BulkAggregateQuestionResultsResponse](docs/BulkAggregateQuestionResultsResponse.md) - [FastCommentsClient::BulkCreateHashTagsBody](docs/BulkCreateHashTagsBody.md) - [FastCommentsClient::BulkCreateHashTagsBodyTagsInner](docs/BulkCreateHashTagsBodyTagsInner.md) - [FastCommentsClient::BulkCreateHashTagsResponse](docs/BulkCreateHashTagsResponse.md) + - [FastCommentsClient::BulkCreateHashTagsResponseResultsInner](docs/BulkCreateHashTagsResponseResultsInner.md) + - [FastCommentsClient::BulkPreBanParams](docs/BulkPreBanParams.md) + - [FastCommentsClient::BulkPreBanSummary](docs/BulkPreBanSummary.md) - [FastCommentsClient::ChangeCommentPinStatusResponse](docs/ChangeCommentPinStatusResponse.md) - - [FastCommentsClient::ChangeTicketState200Response](docs/ChangeTicketState200Response.md) - [FastCommentsClient::ChangeTicketStateBody](docs/ChangeTicketStateBody.md) - [FastCommentsClient::ChangeTicketStateResponse](docs/ChangeTicketStateResponse.md) - [FastCommentsClient::CheckBlockedCommentsResponse](docs/CheckBlockedCommentsResponse.md) - - [FastCommentsClient::CheckedCommentsForBlocked200Response](docs/CheckedCommentsForBlocked200Response.md) - - [FastCommentsClient::CombineCommentsWithQuestionResults200Response](docs/CombineCommentsWithQuestionResults200Response.md) - [FastCommentsClient::CombineQuestionResultsWithCommentsResponse](docs/CombineQuestionResultsWithCommentsResponse.md) - [FastCommentsClient::CommentData](docs/CommentData.md) - [FastCommentsClient::CommentHTMLRenderingMode](docs/CommentHTMLRenderingMode.md) @@ -311,56 +386,42 @@ Class | Method | HTTP request | Description - [FastCommentsClient::CommentUserHashTagInfo](docs/CommentUserHashTagInfo.md) - [FastCommentsClient::CommentUserMentionInfo](docs/CommentUserMentionInfo.md) - [FastCommentsClient::CommenterNameFormats](docs/CommenterNameFormats.md) + - [FastCommentsClient::CommentsByIdsParams](docs/CommentsByIdsParams.md) - [FastCommentsClient::CreateAPIPageData](docs/CreateAPIPageData.md) - [FastCommentsClient::CreateAPISSOUserData](docs/CreateAPISSOUserData.md) - [FastCommentsClient::CreateAPIUserSubscriptionData](docs/CreateAPIUserSubscriptionData.md) - [FastCommentsClient::CreateCommentParams](docs/CreateCommentParams.md) - - [FastCommentsClient::CreateCommentPublic200Response](docs/CreateCommentPublic200Response.md) - - [FastCommentsClient::CreateEmailTemplate200Response](docs/CreateEmailTemplate200Response.md) - [FastCommentsClient::CreateEmailTemplateBody](docs/CreateEmailTemplateBody.md) - [FastCommentsClient::CreateEmailTemplateResponse](docs/CreateEmailTemplateResponse.md) - - [FastCommentsClient::CreateFeedPost200Response](docs/CreateFeedPost200Response.md) - [FastCommentsClient::CreateFeedPostParams](docs/CreateFeedPostParams.md) - - [FastCommentsClient::CreateFeedPostPublic200Response](docs/CreateFeedPostPublic200Response.md) - [FastCommentsClient::CreateFeedPostResponse](docs/CreateFeedPostResponse.md) - [FastCommentsClient::CreateFeedPostsResponse](docs/CreateFeedPostsResponse.md) - [FastCommentsClient::CreateHashTagBody](docs/CreateHashTagBody.md) - [FastCommentsClient::CreateHashTagResponse](docs/CreateHashTagResponse.md) - - [FastCommentsClient::CreateModerator200Response](docs/CreateModerator200Response.md) - [FastCommentsClient::CreateModeratorBody](docs/CreateModeratorBody.md) - [FastCommentsClient::CreateModeratorResponse](docs/CreateModeratorResponse.md) - - [FastCommentsClient::CreateQuestionConfig200Response](docs/CreateQuestionConfig200Response.md) - [FastCommentsClient::CreateQuestionConfigBody](docs/CreateQuestionConfigBody.md) - [FastCommentsClient::CreateQuestionConfigResponse](docs/CreateQuestionConfigResponse.md) - - [FastCommentsClient::CreateQuestionResult200Response](docs/CreateQuestionResult200Response.md) - [FastCommentsClient::CreateQuestionResultBody](docs/CreateQuestionResultBody.md) - [FastCommentsClient::CreateQuestionResultResponse](docs/CreateQuestionResultResponse.md) - [FastCommentsClient::CreateSubscriptionAPIResponse](docs/CreateSubscriptionAPIResponse.md) - - [FastCommentsClient::CreateTenant200Response](docs/CreateTenant200Response.md) - [FastCommentsClient::CreateTenantBody](docs/CreateTenantBody.md) - - [FastCommentsClient::CreateTenantPackage200Response](docs/CreateTenantPackage200Response.md) - [FastCommentsClient::CreateTenantPackageBody](docs/CreateTenantPackageBody.md) - [FastCommentsClient::CreateTenantPackageResponse](docs/CreateTenantPackageResponse.md) - [FastCommentsClient::CreateTenantResponse](docs/CreateTenantResponse.md) - - [FastCommentsClient::CreateTenantUser200Response](docs/CreateTenantUser200Response.md) - [FastCommentsClient::CreateTenantUserBody](docs/CreateTenantUserBody.md) - [FastCommentsClient::CreateTenantUserResponse](docs/CreateTenantUserResponse.md) - - [FastCommentsClient::CreateTicket200Response](docs/CreateTicket200Response.md) - [FastCommentsClient::CreateTicketBody](docs/CreateTicketBody.md) - [FastCommentsClient::CreateTicketResponse](docs/CreateTicketResponse.md) - - [FastCommentsClient::CreateUserBadge200Response](docs/CreateUserBadge200Response.md) - [FastCommentsClient::CreateUserBadgeParams](docs/CreateUserBadgeParams.md) + - [FastCommentsClient::CreateV1PageReact](docs/CreateV1PageReact.md) - [FastCommentsClient::CustomConfigParameters](docs/CustomConfigParameters.md) - [FastCommentsClient::CustomEmailTemplate](docs/CustomEmailTemplate.md) - - [FastCommentsClient::DeleteComment200Response](docs/DeleteComment200Response.md) - [FastCommentsClient::DeleteCommentAction](docs/DeleteCommentAction.md) - - [FastCommentsClient::DeleteCommentPublic200Response](docs/DeleteCommentPublic200Response.md) - [FastCommentsClient::DeleteCommentResult](docs/DeleteCommentResult.md) - - [FastCommentsClient::DeleteCommentVote200Response](docs/DeleteCommentVote200Response.md) - - [FastCommentsClient::DeleteDomainConfig200Response](docs/DeleteDomainConfig200Response.md) - - [FastCommentsClient::DeleteFeedPostPublic200Response](docs/DeleteFeedPostPublic200Response.md) - - [FastCommentsClient::DeleteFeedPostPublic200ResponseAnyOf](docs/DeleteFeedPostPublic200ResponseAnyOf.md) - - [FastCommentsClient::DeleteHashTagRequest](docs/DeleteHashTagRequest.md) + - [FastCommentsClient::DeleteDomainConfigResponse](docs/DeleteDomainConfigResponse.md) + - [FastCommentsClient::DeleteFeedPostPublicResponse](docs/DeleteFeedPostPublicResponse.md) + - [FastCommentsClient::DeleteHashTagRequestBody](docs/DeleteHashTagRequestBody.md) - [FastCommentsClient::DeletePageAPIResponse](docs/DeletePageAPIResponse.md) - [FastCommentsClient::DeleteSSOUserAPIResponse](docs/DeleteSSOUserAPIResponse.md) - [FastCommentsClient::DeleteSubscriptionAPIResponse](docs/DeleteSubscriptionAPIResponse.md) @@ -379,126 +440,124 @@ Class | Method | HTTP request | Description - [FastCommentsClient::FeedPostsStatsResponse](docs/FeedPostsStatsResponse.md) - [FastCommentsClient::FindCommentsByRangeItem](docs/FindCommentsByRangeItem.md) - [FastCommentsClient::FindCommentsByRangeResponse](docs/FindCommentsByRangeResponse.md) - - [FastCommentsClient::FlagComment200Response](docs/FlagComment200Response.md) - - [FastCommentsClient::FlagCommentPublic200Response](docs/FlagCommentPublic200Response.md) - [FastCommentsClient::FlagCommentResponse](docs/FlagCommentResponse.md) - - [FastCommentsClient::GetAuditLogs200Response](docs/GetAuditLogs200Response.md) - [FastCommentsClient::GetAuditLogsResponse](docs/GetAuditLogsResponse.md) - - [FastCommentsClient::GetCachedNotificationCount200Response](docs/GetCachedNotificationCount200Response.md) + - [FastCommentsClient::GetBannedUsersCountResponse](docs/GetBannedUsersCountResponse.md) + - [FastCommentsClient::GetBannedUsersFromCommentResponse](docs/GetBannedUsersFromCommentResponse.md) - [FastCommentsClient::GetCachedNotificationCountResponse](docs/GetCachedNotificationCountResponse.md) - - [FastCommentsClient::GetComment200Response](docs/GetComment200Response.md) - - [FastCommentsClient::GetCommentText200Response](docs/GetCommentText200Response.md) - - [FastCommentsClient::GetCommentVoteUserNames200Response](docs/GetCommentVoteUserNames200Response.md) + - [FastCommentsClient::GetCommentBanStatusResponse](docs/GetCommentBanStatusResponse.md) + - [FastCommentsClient::GetCommentTextResponse](docs/GetCommentTextResponse.md) - [FastCommentsClient::GetCommentVoteUserNamesSuccessResponse](docs/GetCommentVoteUserNamesSuccessResponse.md) - - [FastCommentsClient::GetComments200Response](docs/GetComments200Response.md) - - [FastCommentsClient::GetCommentsPublic200Response](docs/GetCommentsPublic200Response.md) + - [FastCommentsClient::GetCommentsForUserResponse](docs/GetCommentsForUserResponse.md) - [FastCommentsClient::GetCommentsResponsePublicComment](docs/GetCommentsResponsePublicComment.md) - [FastCommentsClient::GetCommentsResponseWithPresencePublicComment](docs/GetCommentsResponseWithPresencePublicComment.md) - - [FastCommentsClient::GetDomainConfig200Response](docs/GetDomainConfig200Response.md) - - [FastCommentsClient::GetDomainConfigs200Response](docs/GetDomainConfigs200Response.md) - - [FastCommentsClient::GetDomainConfigs200ResponseAnyOf](docs/GetDomainConfigs200ResponseAnyOf.md) - - [FastCommentsClient::GetDomainConfigs200ResponseAnyOf1](docs/GetDomainConfigs200ResponseAnyOf1.md) - - [FastCommentsClient::GetEmailTemplate200Response](docs/GetEmailTemplate200Response.md) - - [FastCommentsClient::GetEmailTemplateDefinitions200Response](docs/GetEmailTemplateDefinitions200Response.md) + - [FastCommentsClient::GetDomainConfigResponse](docs/GetDomainConfigResponse.md) + - [FastCommentsClient::GetDomainConfigsResponse](docs/GetDomainConfigsResponse.md) + - [FastCommentsClient::GetDomainConfigsResponseAnyOf](docs/GetDomainConfigsResponseAnyOf.md) + - [FastCommentsClient::GetDomainConfigsResponseAnyOf1](docs/GetDomainConfigsResponseAnyOf1.md) - [FastCommentsClient::GetEmailTemplateDefinitionsResponse](docs/GetEmailTemplateDefinitionsResponse.md) - - [FastCommentsClient::GetEmailTemplateRenderErrors200Response](docs/GetEmailTemplateRenderErrors200Response.md) - [FastCommentsClient::GetEmailTemplateRenderErrorsResponse](docs/GetEmailTemplateRenderErrorsResponse.md) - [FastCommentsClient::GetEmailTemplateResponse](docs/GetEmailTemplateResponse.md) - - [FastCommentsClient::GetEmailTemplates200Response](docs/GetEmailTemplates200Response.md) - [FastCommentsClient::GetEmailTemplatesResponse](docs/GetEmailTemplatesResponse.md) - - [FastCommentsClient::GetEventLog200Response](docs/GetEventLog200Response.md) - [FastCommentsClient::GetEventLogResponse](docs/GetEventLogResponse.md) - - [FastCommentsClient::GetFeedPosts200Response](docs/GetFeedPosts200Response.md) - - [FastCommentsClient::GetFeedPostsPublic200Response](docs/GetFeedPostsPublic200Response.md) - [FastCommentsClient::GetFeedPostsResponse](docs/GetFeedPostsResponse.md) - - [FastCommentsClient::GetFeedPostsStats200Response](docs/GetFeedPostsStats200Response.md) - - [FastCommentsClient::GetHashTags200Response](docs/GetHashTags200Response.md) + - [FastCommentsClient::GetGifsSearchResponse](docs/GetGifsSearchResponse.md) + - [FastCommentsClient::GetGifsTrendingResponse](docs/GetGifsTrendingResponse.md) - [FastCommentsClient::GetHashTagsResponse](docs/GetHashTagsResponse.md) - - [FastCommentsClient::GetModerator200Response](docs/GetModerator200Response.md) - [FastCommentsClient::GetModeratorResponse](docs/GetModeratorResponse.md) - - [FastCommentsClient::GetModerators200Response](docs/GetModerators200Response.md) - [FastCommentsClient::GetModeratorsResponse](docs/GetModeratorsResponse.md) - [FastCommentsClient::GetMyNotificationsResponse](docs/GetMyNotificationsResponse.md) - - [FastCommentsClient::GetNotificationCount200Response](docs/GetNotificationCount200Response.md) - [FastCommentsClient::GetNotificationCountResponse](docs/GetNotificationCountResponse.md) - - [FastCommentsClient::GetNotifications200Response](docs/GetNotifications200Response.md) - [FastCommentsClient::GetNotificationsResponse](docs/GetNotificationsResponse.md) - [FastCommentsClient::GetPageByURLIdAPIResponse](docs/GetPageByURLIdAPIResponse.md) - [FastCommentsClient::GetPagesAPIResponse](docs/GetPagesAPIResponse.md) - - [FastCommentsClient::GetPendingWebhookEventCount200Response](docs/GetPendingWebhookEventCount200Response.md) - [FastCommentsClient::GetPendingWebhookEventCountResponse](docs/GetPendingWebhookEventCountResponse.md) - - [FastCommentsClient::GetPendingWebhookEvents200Response](docs/GetPendingWebhookEvents200Response.md) - [FastCommentsClient::GetPendingWebhookEventsResponse](docs/GetPendingWebhookEventsResponse.md) - [FastCommentsClient::GetPublicFeedPostsResponse](docs/GetPublicFeedPostsResponse.md) - - [FastCommentsClient::GetQuestionConfig200Response](docs/GetQuestionConfig200Response.md) + - [FastCommentsClient::GetPublicPagesResponse](docs/GetPublicPagesResponse.md) - [FastCommentsClient::GetQuestionConfigResponse](docs/GetQuestionConfigResponse.md) - - [FastCommentsClient::GetQuestionConfigs200Response](docs/GetQuestionConfigs200Response.md) - [FastCommentsClient::GetQuestionConfigsResponse](docs/GetQuestionConfigsResponse.md) - - [FastCommentsClient::GetQuestionResult200Response](docs/GetQuestionResult200Response.md) - [FastCommentsClient::GetQuestionResultResponse](docs/GetQuestionResultResponse.md) - - [FastCommentsClient::GetQuestionResults200Response](docs/GetQuestionResults200Response.md) - [FastCommentsClient::GetQuestionResultsResponse](docs/GetQuestionResultsResponse.md) - [FastCommentsClient::GetSSOUserByEmailAPIResponse](docs/GetSSOUserByEmailAPIResponse.md) - [FastCommentsClient::GetSSOUserByIdAPIResponse](docs/GetSSOUserByIdAPIResponse.md) - - [FastCommentsClient::GetSSOUsers200Response](docs/GetSSOUsers200Response.md) + - [FastCommentsClient::GetSSOUsersResponse](docs/GetSSOUsersResponse.md) - [FastCommentsClient::GetSubscriptionsAPIResponse](docs/GetSubscriptionsAPIResponse.md) - - [FastCommentsClient::GetTenant200Response](docs/GetTenant200Response.md) - - [FastCommentsClient::GetTenantDailyUsages200Response](docs/GetTenantDailyUsages200Response.md) - [FastCommentsClient::GetTenantDailyUsagesResponse](docs/GetTenantDailyUsagesResponse.md) - - [FastCommentsClient::GetTenantPackage200Response](docs/GetTenantPackage200Response.md) + - [FastCommentsClient::GetTenantManualBadgesResponse](docs/GetTenantManualBadgesResponse.md) - [FastCommentsClient::GetTenantPackageResponse](docs/GetTenantPackageResponse.md) - - [FastCommentsClient::GetTenantPackages200Response](docs/GetTenantPackages200Response.md) - [FastCommentsClient::GetTenantPackagesResponse](docs/GetTenantPackagesResponse.md) - [FastCommentsClient::GetTenantResponse](docs/GetTenantResponse.md) - - [FastCommentsClient::GetTenantUser200Response](docs/GetTenantUser200Response.md) - [FastCommentsClient::GetTenantUserResponse](docs/GetTenantUserResponse.md) - - [FastCommentsClient::GetTenantUsers200Response](docs/GetTenantUsers200Response.md) - [FastCommentsClient::GetTenantUsersResponse](docs/GetTenantUsersResponse.md) - - [FastCommentsClient::GetTenants200Response](docs/GetTenants200Response.md) - [FastCommentsClient::GetTenantsResponse](docs/GetTenantsResponse.md) - - [FastCommentsClient::GetTicket200Response](docs/GetTicket200Response.md) - [FastCommentsClient::GetTicketResponse](docs/GetTicketResponse.md) - - [FastCommentsClient::GetTickets200Response](docs/GetTickets200Response.md) - [FastCommentsClient::GetTicketsResponse](docs/GetTicketsResponse.md) - - [FastCommentsClient::GetUser200Response](docs/GetUser200Response.md) - - [FastCommentsClient::GetUserBadge200Response](docs/GetUserBadge200Response.md) - - [FastCommentsClient::GetUserBadgeProgressById200Response](docs/GetUserBadgeProgressById200Response.md) - - [FastCommentsClient::GetUserBadgeProgressList200Response](docs/GetUserBadgeProgressList200Response.md) - - [FastCommentsClient::GetUserBadges200Response](docs/GetUserBadges200Response.md) - - [FastCommentsClient::GetUserNotificationCount200Response](docs/GetUserNotificationCount200Response.md) + - [FastCommentsClient::GetTranslationsResponse](docs/GetTranslationsResponse.md) + - [FastCommentsClient::GetUserInternalProfileResponse](docs/GetUserInternalProfileResponse.md) + - [FastCommentsClient::GetUserInternalProfileResponseProfile](docs/GetUserInternalProfileResponseProfile.md) + - [FastCommentsClient::GetUserManualBadgesResponse](docs/GetUserManualBadgesResponse.md) - [FastCommentsClient::GetUserNotificationCountResponse](docs/GetUserNotificationCountResponse.md) - - [FastCommentsClient::GetUserNotifications200Response](docs/GetUserNotifications200Response.md) - - [FastCommentsClient::GetUserPresenceStatuses200Response](docs/GetUserPresenceStatuses200Response.md) - [FastCommentsClient::GetUserPresenceStatusesResponse](docs/GetUserPresenceStatusesResponse.md) - - [FastCommentsClient::GetUserReactsPublic200Response](docs/GetUserReactsPublic200Response.md) - [FastCommentsClient::GetUserResponse](docs/GetUserResponse.md) - - [FastCommentsClient::GetVotes200Response](docs/GetVotes200Response.md) - - [FastCommentsClient::GetVotesForUser200Response](docs/GetVotesForUser200Response.md) + - [FastCommentsClient::GetUserTrustFactorResponse](docs/GetUserTrustFactorResponse.md) + - [FastCommentsClient::GetV1PageLikes](docs/GetV1PageLikes.md) + - [FastCommentsClient::GetV2PageReactUsersResponse](docs/GetV2PageReactUsersResponse.md) + - [FastCommentsClient::GetV2PageReacts](docs/GetV2PageReacts.md) - [FastCommentsClient::GetVotesForUserResponse](docs/GetVotesForUserResponse.md) - [FastCommentsClient::GetVotesResponse](docs/GetVotesResponse.md) + - [FastCommentsClient::GifGetLargeResponse](docs/GifGetLargeResponse.md) - [FastCommentsClient::GifRating](docs/GifRating.md) + - [FastCommentsClient::GifSearchInternalError](docs/GifSearchInternalError.md) + - [FastCommentsClient::GifSearchResponse](docs/GifSearchResponse.md) + - [FastCommentsClient::GifSearchResponseImagesInnerInner](docs/GifSearchResponseImagesInnerInner.md) - [FastCommentsClient::HeaderAccountNotification](docs/HeaderAccountNotification.md) - [FastCommentsClient::HeaderState](docs/HeaderState.md) - [FastCommentsClient::IgnoredResponse](docs/IgnoredResponse.md) - [FastCommentsClient::ImageContentProfanityLevel](docs/ImageContentProfanityLevel.md) + - [FastCommentsClient::ImportedAgentApprovalNotificationFrequency](docs/ImportedAgentApprovalNotificationFrequency.md) - [FastCommentsClient::ImportedSiteType](docs/ImportedSiteType.md) - [FastCommentsClient::LiveEvent](docs/LiveEvent.md) - [FastCommentsClient::LiveEventExtraInfo](docs/LiveEventExtraInfo.md) - [FastCommentsClient::LiveEventType](docs/LiveEventType.md) - - [FastCommentsClient::LockComment200Response](docs/LockComment200Response.md) - [FastCommentsClient::MediaAsset](docs/MediaAsset.md) - [FastCommentsClient::MentionAutoCompleteMode](docs/MentionAutoCompleteMode.md) - [FastCommentsClient::MetaItem](docs/MetaItem.md) + - [FastCommentsClient::ModerationAPIChildCommentsResponse](docs/ModerationAPIChildCommentsResponse.md) + - [FastCommentsClient::ModerationAPIComment](docs/ModerationAPIComment.md) + - [FastCommentsClient::ModerationAPICommentLog](docs/ModerationAPICommentLog.md) + - [FastCommentsClient::ModerationAPICommentResponse](docs/ModerationAPICommentResponse.md) + - [FastCommentsClient::ModerationAPICountCommentsResponse](docs/ModerationAPICountCommentsResponse.md) + - [FastCommentsClient::ModerationAPIGetCommentIdsResponse](docs/ModerationAPIGetCommentIdsResponse.md) + - [FastCommentsClient::ModerationAPIGetCommentsResponse](docs/ModerationAPIGetCommentsResponse.md) + - [FastCommentsClient::ModerationAPIGetLogsResponse](docs/ModerationAPIGetLogsResponse.md) + - [FastCommentsClient::ModerationCommentSearchResponse](docs/ModerationCommentSearchResponse.md) + - [FastCommentsClient::ModerationExportResponse](docs/ModerationExportResponse.md) + - [FastCommentsClient::ModerationExportStatusResponse](docs/ModerationExportStatusResponse.md) + - [FastCommentsClient::ModerationFilter](docs/ModerationFilter.md) + - [FastCommentsClient::ModerationPageSearchProjected](docs/ModerationPageSearchProjected.md) + - [FastCommentsClient::ModerationPageSearchResponse](docs/ModerationPageSearchResponse.md) + - [FastCommentsClient::ModerationSiteSearchProjected](docs/ModerationSiteSearchProjected.md) + - [FastCommentsClient::ModerationSiteSearchResponse](docs/ModerationSiteSearchResponse.md) + - [FastCommentsClient::ModerationSuggestResponse](docs/ModerationSuggestResponse.md) + - [FastCommentsClient::ModerationUserSearchProjected](docs/ModerationUserSearchProjected.md) + - [FastCommentsClient::ModerationUserSearchResponse](docs/ModerationUserSearchResponse.md) - [FastCommentsClient::Moderator](docs/Moderator.md) - [FastCommentsClient::NotificationAndCount](docs/NotificationAndCount.md) - [FastCommentsClient::NotificationObjectType](docs/NotificationObjectType.md) - [FastCommentsClient::NotificationType](docs/NotificationType.md) + - [FastCommentsClient::PageUserEntry](docs/PageUserEntry.md) + - [FastCommentsClient::PageUsersInfoResponse](docs/PageUsersInfoResponse.md) + - [FastCommentsClient::PageUsersOfflineResponse](docs/PageUsersOfflineResponse.md) + - [FastCommentsClient::PageUsersOnlineResponse](docs/PageUsersOnlineResponse.md) + - [FastCommentsClient::PagesSortBy](docs/PagesSortBy.md) - [FastCommentsClient::PatchDomainConfigParams](docs/PatchDomainConfigParams.md) - - [FastCommentsClient::PatchHashTag200Response](docs/PatchHashTag200Response.md) + - [FastCommentsClient::PatchDomainConfigResponse](docs/PatchDomainConfigResponse.md) - [FastCommentsClient::PatchPageAPIResponse](docs/PatchPageAPIResponse.md) - [FastCommentsClient::PatchSSOUserAPIResponse](docs/PatchSSOUserAPIResponse.md) - [FastCommentsClient::PendingCommentToSyncOutbound](docs/PendingCommentToSyncOutbound.md) - - [FastCommentsClient::PinComment200Response](docs/PinComment200Response.md) + - [FastCommentsClient::PostRemoveCommentResponse](docs/PostRemoveCommentResponse.md) + - [FastCommentsClient::PreBanSummary](docs/PreBanSummary.md) - [FastCommentsClient::PubSubComment](docs/PubSubComment.md) - [FastCommentsClient::PubSubCommentBase](docs/PubSubCommentBase.md) - [FastCommentsClient::PubSubVote](docs/PubSubVote.md) @@ -509,7 +568,9 @@ Class | Method | HTTP request | Description - [FastCommentsClient::PublicComment](docs/PublicComment.md) - [FastCommentsClient::PublicCommentBase](docs/PublicCommentBase.md) - [FastCommentsClient::PublicFeedPostsResponse](docs/PublicFeedPostsResponse.md) + - [FastCommentsClient::PublicPage](docs/PublicPage.md) - [FastCommentsClient::PublicVote](docs/PublicVote.md) + - [FastCommentsClient::PutDomainConfigResponse](docs/PutDomainConfigResponse.md) - [FastCommentsClient::PutSSOUserAPIResponse](docs/PutSSOUserAPIResponse.md) - [FastCommentsClient::QueryPredicate](docs/QueryPredicate.md) - [FastCommentsClient::QueryPredicateValue](docs/QueryPredicateValue.md) @@ -522,11 +583,10 @@ Class | Method | HTTP request | Description - [FastCommentsClient::QuestionSubQuestionVisibility](docs/QuestionSubQuestionVisibility.md) - [FastCommentsClient::QuestionWhenSave](docs/QuestionWhenSave.md) - [FastCommentsClient::ReactBodyParams](docs/ReactBodyParams.md) - - [FastCommentsClient::ReactFeedPostPublic200Response](docs/ReactFeedPostPublic200Response.md) - [FastCommentsClient::ReactFeedPostResponse](docs/ReactFeedPostResponse.md) - [FastCommentsClient::RecordStringBeforeStringOrNullAfterStringOrNullValue](docs/RecordStringBeforeStringOrNullAfterStringOrNullValue.md) - - [FastCommentsClient::RecordStringStringOrNumberValue](docs/RecordStringStringOrNumberValue.md) - - [FastCommentsClient::RenderEmailTemplate200Response](docs/RenderEmailTemplate200Response.md) + - [FastCommentsClient::RemoveCommentActionResponse](docs/RemoveCommentActionResponse.md) + - [FastCommentsClient::RemoveUserBadgeResponse](docs/RemoveUserBadgeResponse.md) - [FastCommentsClient::RenderEmailTemplateBody](docs/RenderEmailTemplateBody.md) - [FastCommentsClient::RenderEmailTemplateResponse](docs/RenderEmailTemplateResponse.md) - [FastCommentsClient::RenderableUserNotification](docs/RenderableUserNotification.md) @@ -534,26 +594,27 @@ Class | Method | HTTP request | Description - [FastCommentsClient::RepeatCommentHandlingAction](docs/RepeatCommentHandlingAction.md) - [FastCommentsClient::ReplaceTenantPackageBody](docs/ReplaceTenantPackageBody.md) - [FastCommentsClient::ReplaceTenantUserBody](docs/ReplaceTenantUserBody.md) - - [FastCommentsClient::ResetUserNotifications200Response](docs/ResetUserNotifications200Response.md) - [FastCommentsClient::ResetUserNotificationsResponse](docs/ResetUserNotificationsResponse.md) - [FastCommentsClient::SORTDIR](docs/SORTDIR.md) - [FastCommentsClient::SSOSecurityLevel](docs/SSOSecurityLevel.md) - - [FastCommentsClient::SaveComment200Response](docs/SaveComment200Response.md) - - [FastCommentsClient::SaveCommentResponse](docs/SaveCommentResponse.md) - [FastCommentsClient::SaveCommentResponseOptimized](docs/SaveCommentResponseOptimized.md) + - [FastCommentsClient::SaveCommentsBulkResponse](docs/SaveCommentsBulkResponse.md) - [FastCommentsClient::SaveCommentsResponseWithPresence](docs/SaveCommentsResponseWithPresence.md) - - [FastCommentsClient::SearchUsers200Response](docs/SearchUsers200Response.md) - [FastCommentsClient::SearchUsersResponse](docs/SearchUsersResponse.md) + - [FastCommentsClient::SearchUsersResult](docs/SearchUsersResult.md) - [FastCommentsClient::SearchUsersSectionedResponse](docs/SearchUsersSectionedResponse.md) - - [FastCommentsClient::SetCommentText200Response](docs/SetCommentText200Response.md) + - [FastCommentsClient::SetCommentApprovedResponse](docs/SetCommentApprovedResponse.md) + - [FastCommentsClient::SetCommentTextParams](docs/SetCommentTextParams.md) + - [FastCommentsClient::SetCommentTextResponse](docs/SetCommentTextResponse.md) - [FastCommentsClient::SetCommentTextResult](docs/SetCommentTextResult.md) + - [FastCommentsClient::SetUserTrustFactorResponse](docs/SetUserTrustFactorResponse.md) - [FastCommentsClient::SizePreset](docs/SizePreset.md) - [FastCommentsClient::SortDirections](docs/SortDirections.md) - [FastCommentsClient::SpamRule](docs/SpamRule.md) - [FastCommentsClient::TOSConfig](docs/TOSConfig.md) + - [FastCommentsClient::TenantBadge](docs/TenantBadge.md) - [FastCommentsClient::TenantHashTag](docs/TenantHashTag.md) - [FastCommentsClient::TenantPackage](docs/TenantPackage.md) - - [FastCommentsClient::UnBlockCommentPublic200Response](docs/UnBlockCommentPublic200Response.md) - [FastCommentsClient::UnBlockFromCommentParams](docs/UnBlockFromCommentParams.md) - [FastCommentsClient::UnblockSuccess](docs/UnblockSuccess.md) - [FastCommentsClient::UpdatableCommentParams](docs/UpdatableCommentParams.md) @@ -573,9 +634,10 @@ Class | Method | HTTP request | Description - [FastCommentsClient::UpdateTenantBody](docs/UpdateTenantBody.md) - [FastCommentsClient::UpdateTenantPackageBody](docs/UpdateTenantPackageBody.md) - [FastCommentsClient::UpdateTenantUserBody](docs/UpdateTenantUserBody.md) - - [FastCommentsClient::UpdateUserBadge200Response](docs/UpdateUserBadge200Response.md) - [FastCommentsClient::UpdateUserBadgeParams](docs/UpdateUserBadgeParams.md) - - [FastCommentsClient::UpdateUserNotificationStatus200Response](docs/UpdateUserNotificationStatus200Response.md) + - [FastCommentsClient::UpdateUserNotificationCommentSubscriptionStatusResponse](docs/UpdateUserNotificationCommentSubscriptionStatusResponse.md) + - [FastCommentsClient::UpdateUserNotificationPageSubscriptionStatusResponse](docs/UpdateUserNotificationPageSubscriptionStatusResponse.md) + - [FastCommentsClient::UpdateUserNotificationStatusResponse](docs/UpdateUserNotificationStatusResponse.md) - [FastCommentsClient::UploadImageResponse](docs/UploadImageResponse.md) - [FastCommentsClient::User](docs/User.md) - [FastCommentsClient::UserBadge](docs/UserBadge.md) @@ -589,10 +651,11 @@ Class | Method | HTTP request | Description - [FastCommentsClient::UserSearchSection](docs/UserSearchSection.md) - [FastCommentsClient::UserSearchSectionResult](docs/UserSearchSectionResult.md) - [FastCommentsClient::UserSessionInfo](docs/UserSessionInfo.md) + - [FastCommentsClient::UsersListLocation](docs/UsersListLocation.md) - [FastCommentsClient::VoteBodyParams](docs/VoteBodyParams.md) - - [FastCommentsClient::VoteComment200Response](docs/VoteComment200Response.md) - [FastCommentsClient::VoteDeleteResponse](docs/VoteDeleteResponse.md) - [FastCommentsClient::VoteResponse](docs/VoteResponse.md) + - [FastCommentsClient::VoteResponseStatus](docs/VoteResponseStatus.md) - [FastCommentsClient::VoteResponseUser](docs/VoteResponseUser.md) - [FastCommentsClient::VoteStyle](docs/VoteStyle.md) diff --git a/client/docs/APIBanUserChangeLog.md b/client/docs/APIBanUserChangeLog.md new file mode 100644 index 0000000..f5d97be --- /dev/null +++ b/client/docs/APIBanUserChangeLog.md @@ -0,0 +1,24 @@ +# FastCommentsClient::APIBanUserChangeLog + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **created_banned_user_id** | **String** | | [optional] | +| **updated_banned_user_id** | **String** | | [optional] | +| **deleted_banned_users** | [**Array<APIBannedUser>**](APIBannedUser.md) | | [optional] | +| **changed_values_before** | [**APIBanUserChangedValues**](APIBanUserChangedValues.md) | | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::APIBanUserChangeLog.new( + created_banned_user_id: null, + updated_banned_user_id: null, + deleted_banned_users: null, + changed_values_before: null +) +``` + diff --git a/client/docs/APIBanUserChangedValues.md b/client/docs/APIBanUserChangedValues.md new file mode 100644 index 0000000..92430cc --- /dev/null +++ b/client/docs/APIBanUserChangedValues.md @@ -0,0 +1,42 @@ +# FastCommentsClient::APIBanUserChangedValues + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **_id** | **String** | | [optional] | +| **tenant_id** | **String** | | [optional] | +| **user_id** | **String** | | [optional] | +| **email** | **String** | | [optional] | +| **username** | **String** | | [optional] | +| **ip_hash** | **String** | | [optional] | +| **created_at** | **Time** | | [optional] | +| **banned_by_user_id** | **String** | | [optional] | +| **banned_comment_text** | **String** | | [optional] | +| **ban_type** | **String** | | [optional] | +| **banned_until** | **Time** | | [optional] | +| **has_email_wildcard** | **Boolean** | | [optional] | +| **ban_reason** | **String** | | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::APIBanUserChangedValues.new( + _id: null, + tenant_id: null, + user_id: null, + email: null, + username: null, + ip_hash: null, + created_at: null, + banned_by_user_id: null, + banned_comment_text: null, + ban_type: null, + banned_until: null, + has_email_wildcard: null, + ban_reason: null +) +``` + diff --git a/client/docs/APIBannedUser.md b/client/docs/APIBannedUser.md new file mode 100644 index 0000000..611892e --- /dev/null +++ b/client/docs/APIBannedUser.md @@ -0,0 +1,42 @@ +# FastCommentsClient::APIBannedUser + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **_id** | **String** | | | +| **tenant_id** | **String** | | | +| **user_id** | **String** | | [optional] | +| **email** | **String** | | [optional] | +| **username** | **String** | | [optional] | +| **ip_hash** | **String** | | [optional] | +| **created_at** | **Time** | | | +| **banned_by_user_id** | **String** | | | +| **banned_comment_text** | **String** | | | +| **ban_type** | **String** | | | +| **banned_until** | **Time** | | | +| **has_email_wildcard** | **Boolean** | | | +| **ban_reason** | **String** | | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::APIBannedUser.new( + _id: null, + tenant_id: null, + user_id: null, + email: null, + username: null, + ip_hash: null, + created_at: null, + banned_by_user_id: null, + banned_comment_text: null, + ban_type: null, + banned_until: null, + has_email_wildcard: null, + ban_reason: null +) +``` + diff --git a/client/docs/APIBannedUserWithMultiMatchInfo.md b/client/docs/APIBannedUserWithMultiMatchInfo.md new file mode 100644 index 0000000..64c8fab --- /dev/null +++ b/client/docs/APIBannedUserWithMultiMatchInfo.md @@ -0,0 +1,34 @@ +# FastCommentsClient::APIBannedUserWithMultiMatchInfo + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **_id** | **String** | | | +| **user_id** | **String** | | [optional] | +| **ban_type** | **String** | | | +| **email** | **String** | | [optional] | +| **ip_hash** | **String** | | [optional] | +| **banned_until** | **Time** | | | +| **has_email_wildcard** | **Boolean** | | | +| **ban_reason** | **String** | | [optional] | +| **matches** | [**Array<BannedUserMatch>**](BannedUserMatch.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::APIBannedUserWithMultiMatchInfo.new( + _id: null, + user_id: null, + ban_type: null, + email: null, + ip_hash: null, + banned_until: null, + has_email_wildcard: null, + ban_reason: null, + matches: null +) +``` + diff --git a/client/docs/APIComment.md b/client/docs/APIComment.md index d9942f1..d6e3895 100644 --- a/client/docs/APIComment.md +++ b/client/docs/APIComment.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **_id** | **String** | | | +| **id** | **String** | | | | **ai_determined_spam** | **Boolean** | | [optional] | | **anon_user_id** | **String** | | [optional] | | **approved** | **Boolean** | | | @@ -64,7 +64,7 @@ require 'fastcomments-client' instance = FastCommentsClient::APIComment.new( - _id: null, + id: null, ai_determined_spam: null, anon_user_id: null, approved: null, diff --git a/client/docs/APICommentBase.md b/client/docs/APICommentBase.md index de2fd5c..647bb0d 100644 --- a/client/docs/APICommentBase.md +++ b/client/docs/APICommentBase.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **_id** | **String** | | | +| **id** | **String** | | | | **ai_determined_spam** | **Boolean** | | [optional] | | **anon_user_id** | **String** | | [optional] | | **approved** | **Boolean** | | | @@ -64,7 +64,7 @@ require 'fastcomments-client' instance = FastCommentsClient::APICommentBase.new( - _id: null, + id: null, ai_determined_spam: null, anon_user_id: null, approved: null, diff --git a/client/docs/APICommentCommonBannedUser.md b/client/docs/APICommentCommonBannedUser.md new file mode 100644 index 0000000..d026b5d --- /dev/null +++ b/client/docs/APICommentCommonBannedUser.md @@ -0,0 +1,32 @@ +# FastCommentsClient::APICommentCommonBannedUser + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **_id** | **String** | | | +| **user_id** | **String** | | [optional] | +| **ban_type** | **String** | | | +| **email** | **String** | | [optional] | +| **ip_hash** | **String** | | [optional] | +| **banned_until** | **Time** | | | +| **has_email_wildcard** | **Boolean** | | | +| **ban_reason** | **String** | | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::APICommentCommonBannedUser.new( + _id: null, + user_id: null, + ban_type: null, + email: null, + ip_hash: null, + banned_until: null, + has_email_wildcard: null, + ban_reason: null +) +``` + diff --git a/client/docs/APIModerateGetUserBanPreferencesResponse.md b/client/docs/APIModerateGetUserBanPreferencesResponse.md new file mode 100644 index 0000000..7c0bb63 --- /dev/null +++ b/client/docs/APIModerateGetUserBanPreferencesResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::APIModerateGetUserBanPreferencesResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **preferences** | [**APIModerateUserBanPreferences**](APIModerateUserBanPreferences.md) | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::APIModerateGetUserBanPreferencesResponse.new( + preferences: null, + status: null +) +``` + diff --git a/client/docs/APIModerateUserBanPreferences.md b/client/docs/APIModerateUserBanPreferences.md new file mode 100644 index 0000000..0353f39 --- /dev/null +++ b/client/docs/APIModerateUserBanPreferences.md @@ -0,0 +1,24 @@ +# FastCommentsClient::APIModerateUserBanPreferences + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **should_ban_email** | **Boolean** | | | +| **should_ban_by_ip** | **Boolean** | | | +| **last_ban_type** | **String** | | | +| **last_ban_duration** | **String** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::APIModerateUserBanPreferences.new( + should_ban_email: null, + should_ban_by_ip: null, + last_ban_type: null, + last_ban_duration: null +) +``` + diff --git a/client/docs/SaveCommentResponse.md b/client/docs/APISaveCommentResponse.md similarity index 74% rename from client/docs/SaveCommentResponse.md rename to client/docs/APISaveCommentResponse.md index 0b6dfe0..6de647c 100644 --- a/client/docs/SaveCommentResponse.md +++ b/client/docs/APISaveCommentResponse.md @@ -1,11 +1,11 @@ -# FastCommentsClient::SaveCommentResponse +# FastCommentsClient::APISaveCommentResponse ## Properties | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **status** | [**APIStatus**](APIStatus.md) | | | -| **comment** | [**FComment**](FComment.md) | | | +| **comment** | [**APIComment**](APIComment.md) | | | | **user** | [**UserSessionInfo**](UserSessionInfo.md) | | | | **module_data** | **Hash<String, Object>** | Construct a type with a set of properties K of type T | [optional] | @@ -14,7 +14,7 @@ ```ruby require 'fastcomments-client' -instance = FastCommentsClient::SaveCommentResponse.new( +instance = FastCommentsClient::APISaveCommentResponse.new( status: null, comment: null, user: null, diff --git a/client/docs/AddDomainConfig200Response.md b/client/docs/AddDomainConfigResponse.md similarity index 76% rename from client/docs/AddDomainConfig200Response.md rename to client/docs/AddDomainConfigResponse.md index 5d1582f..0c97a67 100644 --- a/client/docs/AddDomainConfig200Response.md +++ b/client/docs/AddDomainConfigResponse.md @@ -1,4 +1,4 @@ -# FastCommentsClient::AddDomainConfig200Response +# FastCommentsClient::AddDomainConfigResponse ## Properties @@ -14,7 +14,7 @@ ```ruby require 'fastcomments-client' -instance = FastCommentsClient::AddDomainConfig200Response.new( +instance = FastCommentsClient::AddDomainConfigResponse.new( reason: null, code: null, status: null, diff --git a/client/docs/AddDomainConfig200ResponseAnyOf.md b/client/docs/AddDomainConfigResponseAnyOf.md similarity index 68% rename from client/docs/AddDomainConfig200ResponseAnyOf.md rename to client/docs/AddDomainConfigResponseAnyOf.md index ba4f811..921094e 100644 --- a/client/docs/AddDomainConfig200ResponseAnyOf.md +++ b/client/docs/AddDomainConfigResponseAnyOf.md @@ -1,4 +1,4 @@ -# FastCommentsClient::AddDomainConfig200ResponseAnyOf +# FastCommentsClient::AddDomainConfigResponseAnyOf ## Properties @@ -12,7 +12,7 @@ ```ruby require 'fastcomments-client' -instance = FastCommentsClient::AddDomainConfig200ResponseAnyOf.new( +instance = FastCommentsClient::AddDomainConfigResponseAnyOf.new( configuration: null, status: null ) diff --git a/client/docs/AddHashTag200Response.md b/client/docs/AddHashTag200Response.md deleted file mode 100644 index a1e56d0..0000000 --- a/client/docs/AddHashTag200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::AddHashTag200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **hash_tag** | [**TenantHashTag**](TenantHashTag.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::AddHashTag200Response.new( - status: null, - hash_tag: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/AddHashTagsBulk200Response.md b/client/docs/AddHashTagsBulk200Response.md deleted file mode 100644 index f80e4f9..0000000 --- a/client/docs/AddHashTagsBulk200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::AddHashTagsBulk200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **results** | [**Array<AddHashTag200Response>**](AddHashTag200Response.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::AddHashTagsBulk200Response.new( - status: null, - results: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/AdjustCommentVotesParams.md b/client/docs/AdjustCommentVotesParams.md new file mode 100644 index 0000000..dc73caf --- /dev/null +++ b/client/docs/AdjustCommentVotesParams.md @@ -0,0 +1,18 @@ +# FastCommentsClient::AdjustCommentVotesParams + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **adjust_vote_amount** | **Float** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::AdjustCommentVotesParams.new( + adjust_vote_amount: null +) +``` + diff --git a/client/docs/AdjustVotesResponse.md b/client/docs/AdjustVotesResponse.md new file mode 100644 index 0000000..b96e608 --- /dev/null +++ b/client/docs/AdjustVotesResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::AdjustVotesResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | **String** | | | +| **new_comment_votes** | **Integer** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::AdjustVotesResponse.new( + status: null, + new_comment_votes: null +) +``` + diff --git a/client/docs/AggregateQuestionResults200Response.md b/client/docs/AggregateQuestionResults200Response.md deleted file mode 100644 index 779446a..0000000 --- a/client/docs/AggregateQuestionResults200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::AggregateQuestionResults200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **data** | [**QuestionResultAggregationOverall**](QuestionResultAggregationOverall.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::AggregateQuestionResults200Response.new( - status: null, - data: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/AggregateResponse.md b/client/docs/AggregateResponse.md new file mode 100644 index 0000000..53c2340 --- /dev/null +++ b/client/docs/AggregateResponse.md @@ -0,0 +1,28 @@ +# FastCommentsClient::AggregateResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | [**APIStatus**](APIStatus.md) | | | +| **data** | [**Array<AggregationItem>**](AggregationItem.md) | | | +| **stats** | [**AggregationResponseStats**](AggregationResponseStats.md) | | [optional] | +| **reason** | **String** | | | +| **code** | **String** | | | +| **valid_resource_names** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::AggregateResponse.new( + status: null, + data: null, + stats: null, + reason: null, + code: null, + valid_resource_names: null +) +``` + diff --git a/client/docs/AggregationAPIError.md b/client/docs/AggregationAPIError.md new file mode 100644 index 0000000..f547256 --- /dev/null +++ b/client/docs/AggregationAPIError.md @@ -0,0 +1,24 @@ +# FastCommentsClient::AggregationAPIError + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | [**APIStatus**](APIStatus.md) | | | +| **reason** | **String** | | | +| **code** | **String** | | | +| **valid_resource_names** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::AggregationAPIError.new( + status: null, + reason: null, + code: null, + valid_resource_names: null +) +``` + diff --git a/client/docs/AwardUserBadgeResponse.md b/client/docs/AwardUserBadgeResponse.md new file mode 100644 index 0000000..a234910 --- /dev/null +++ b/client/docs/AwardUserBadgeResponse.md @@ -0,0 +1,22 @@ +# FastCommentsClient::AwardUserBadgeResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **notes** | **Array<String>** | | [optional] | +| **badges** | [**Array<CommentUserBadgeInfo>**](CommentUserBadgeInfo.md) | | [optional] | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::AwardUserBadgeResponse.new( + notes: null, + badges: null, + status: null +) +``` + diff --git a/client/docs/BanUserFromCommentResult.md b/client/docs/BanUserFromCommentResult.md new file mode 100644 index 0000000..c7d3316 --- /dev/null +++ b/client/docs/BanUserFromCommentResult.md @@ -0,0 +1,24 @@ +# FastCommentsClient::BanUserFromCommentResult + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | **String** | | | +| **changelog** | [**APIBanUserChangeLog**](APIBanUserChangeLog.md) | | [optional] | +| **code** | **String** | | [optional] | +| **reason** | **String** | | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::BanUserFromCommentResult.new( + status: null, + changelog: null, + code: null, + reason: null +) +``` + diff --git a/client/docs/BanUserUndoParams.md b/client/docs/BanUserUndoParams.md new file mode 100644 index 0000000..5d9b758 --- /dev/null +++ b/client/docs/BanUserUndoParams.md @@ -0,0 +1,18 @@ +# FastCommentsClient::BanUserUndoParams + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **changelog** | [**APIBanUserChangeLog**](APIBanUserChangeLog.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::BanUserUndoParams.new( + changelog: null +) +``` + diff --git a/client/docs/BannedUserMatch.md b/client/docs/BannedUserMatch.md new file mode 100644 index 0000000..99a8467 --- /dev/null +++ b/client/docs/BannedUserMatch.md @@ -0,0 +1,20 @@ +# FastCommentsClient::BannedUserMatch + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **matched_on** | [**BannedUserMatchType**](BannedUserMatchType.md) | | | +| **matched_on_value** | [**BannedUserMatchMatchedOnValue**](BannedUserMatchMatchedOnValue.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::BannedUserMatch.new( + matched_on: null, + matched_on_value: null +) +``` + diff --git a/client/docs/RecordStringStringOrNumberValue.md b/client/docs/BannedUserMatchMatchedOnValue.md similarity index 54% rename from client/docs/RecordStringStringOrNumberValue.md rename to client/docs/BannedUserMatchMatchedOnValue.md index 33d9d23..243e35d 100644 --- a/client/docs/RecordStringStringOrNumberValue.md +++ b/client/docs/BannedUserMatchMatchedOnValue.md @@ -1,4 +1,4 @@ -# FastCommentsClient::RecordStringStringOrNumberValue +# FastCommentsClient::BannedUserMatchMatchedOnValue ## Properties @@ -10,6 +10,6 @@ ```ruby require 'fastcomments-client' -instance = FastCommentsClient::RecordStringStringOrNumberValue.new() +instance = FastCommentsClient::BannedUserMatchMatchedOnValue.new() ``` diff --git a/client/docs/BannedUserMatchType.md b/client/docs/BannedUserMatchType.md new file mode 100644 index 0000000..f849df4 --- /dev/null +++ b/client/docs/BannedUserMatchType.md @@ -0,0 +1,15 @@ +# FastCommentsClient::BannedUserMatchType + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::BannedUserMatchType.new() +``` + diff --git a/client/docs/BlockFromCommentPublic200Response.md b/client/docs/BlockFromCommentPublic200Response.md deleted file mode 100644 index 30af3b4..0000000 --- a/client/docs/BlockFromCommentPublic200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::BlockFromCommentPublic200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **comment_statuses** | **Hash<String, Boolean>** | Construct a type with a set of properties K of type T | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::BlockFromCommentPublic200Response.new( - status: null, - comment_statuses: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/BuildModerationFilterParams.md b/client/docs/BuildModerationFilterParams.md new file mode 100644 index 0000000..86b6c2c --- /dev/null +++ b/client/docs/BuildModerationFilterParams.md @@ -0,0 +1,26 @@ +# FastCommentsClient::BuildModerationFilterParams + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_id** | **String** | | | +| **tenant_id** | **String** | | | +| **filters** | **String** | | [optional] | +| **search_filters** | **String** | | [optional] | +| **text_search** | **String** | | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::BuildModerationFilterParams.new( + user_id: null, + tenant_id: null, + filters: null, + search_filters: null, + text_search: null +) +``` + diff --git a/client/docs/BuildModerationFilterResponse.md b/client/docs/BuildModerationFilterResponse.md new file mode 100644 index 0000000..e1421e3 --- /dev/null +++ b/client/docs/BuildModerationFilterResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::BuildModerationFilterResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | **String** | | | +| **moderation_filter** | [**ModerationFilter**](ModerationFilter.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::BuildModerationFilterResponse.new( + status: null, + moderation_filter: null +) +``` + diff --git a/client/docs/BulkAggregateQuestionResults200Response.md b/client/docs/BulkAggregateQuestionResults200Response.md deleted file mode 100644 index e5c2ef1..0000000 --- a/client/docs/BulkAggregateQuestionResults200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::BulkAggregateQuestionResults200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **data** | [**Hash<String, QuestionResultAggregationOverall>**](QuestionResultAggregationOverall.md) | Construct a type with a set of properties K of type T | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::BulkAggregateQuestionResults200Response.new( - status: null, - data: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/BulkCreateHashTagsResponse.md b/client/docs/BulkCreateHashTagsResponse.md index 432f917..502f6f3 100644 --- a/client/docs/BulkCreateHashTagsResponse.md +++ b/client/docs/BulkCreateHashTagsResponse.md @@ -5,7 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **status** | [**APIStatus**](APIStatus.md) | | | -| **results** | [**Array<AddHashTag200Response>**](AddHashTag200Response.md) | | | +| **results** | [**Array<BulkCreateHashTagsResponseResultsInner>**](BulkCreateHashTagsResponseResultsInner.md) | | | ## Example diff --git a/client/docs/PatchHashTag200Response.md b/client/docs/BulkCreateHashTagsResponseResultsInner.md similarity index 85% rename from client/docs/PatchHashTag200Response.md rename to client/docs/BulkCreateHashTagsResponseResultsInner.md index 98fbecf..bee12bf 100644 --- a/client/docs/PatchHashTag200Response.md +++ b/client/docs/BulkCreateHashTagsResponseResultsInner.md @@ -1,4 +1,4 @@ -# FastCommentsClient::PatchHashTag200Response +# FastCommentsClient::BulkCreateHashTagsResponseResultsInner ## Properties @@ -19,7 +19,7 @@ ```ruby require 'fastcomments-client' -instance = FastCommentsClient::PatchHashTag200Response.new( +instance = FastCommentsClient::BulkCreateHashTagsResponseResultsInner.new( status: null, hash_tag: null, reason: null, diff --git a/client/docs/BulkPreBanParams.md b/client/docs/BulkPreBanParams.md new file mode 100644 index 0000000..1851f76 --- /dev/null +++ b/client/docs/BulkPreBanParams.md @@ -0,0 +1,18 @@ +# FastCommentsClient::BulkPreBanParams + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_ids** | **Array<String>** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::BulkPreBanParams.new( + comment_ids: null +) +``` + diff --git a/client/docs/BulkPreBanSummary.md b/client/docs/BulkPreBanSummary.md new file mode 100644 index 0000000..39386e0 --- /dev/null +++ b/client/docs/BulkPreBanSummary.md @@ -0,0 +1,28 @@ +# FastCommentsClient::BulkPreBanSummary + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | **String** | | | +| **total_related_comment_count** | **Integer** | | | +| **email_domains** | **Array<String>** | | | +| **emails** | **Array<String>** | | | +| **user_ids** | **Array<String>** | | | +| **ip_hashes** | **Array<String>** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::BulkPreBanSummary.new( + status: null, + total_related_comment_count: null, + email_domains: null, + emails: null, + user_ids: null, + ip_hashes: null +) +``` + diff --git a/client/docs/ChangeTicketState200Response.md b/client/docs/ChangeTicketState200Response.md deleted file mode 100644 index 01efbf1..0000000 --- a/client/docs/ChangeTicketState200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::ChangeTicketState200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **ticket** | [**APITicket**](APITicket.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::ChangeTicketState200Response.new( - status: null, - ticket: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/CheckedCommentsForBlocked200Response.md b/client/docs/CheckedCommentsForBlocked200Response.md deleted file mode 100644 index af0387c..0000000 --- a/client/docs/CheckedCommentsForBlocked200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::CheckedCommentsForBlocked200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **comment_statuses** | **Hash<String, Boolean>** | Construct a type with a set of properties K of type T | | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::CheckedCommentsForBlocked200Response.new( - comment_statuses: null, - status: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/CombineCommentsWithQuestionResults200Response.md b/client/docs/CombineCommentsWithQuestionResults200Response.md deleted file mode 100644 index 66d568f..0000000 --- a/client/docs/CombineCommentsWithQuestionResults200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::CombineCommentsWithQuestionResults200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **data** | [**FindCommentsByRangeResponse**](FindCommentsByRangeResponse.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::CombineCommentsWithQuestionResults200Response.new( - status: null, - data: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/CommentData.md b/client/docs/CommentData.md index 5772cce..2075ac8 100644 --- a/client/docs/CommentData.md +++ b/client/docs/CommentData.md @@ -27,8 +27,9 @@ | **from_offline_restore** | **Boolean** | | [optional] | | **autoplay_delay_ms** | **Integer** | | [optional] | | **feedback_ids** | **Array<String>** | | [optional] | -| **question_values** | [**Hash<String, RecordStringStringOrNumberValue>**](RecordStringStringOrNumberValue.md) | Construct a type with a set of properties K of type T | [optional] | +| **question_values** | [**Hash<String, GifSearchResponseImagesInnerInner>**](GifSearchResponseImagesInnerInner.md) | Construct a type with a set of properties K of type T | [optional] | | **tos** | **Boolean** | | [optional] | +| **bot_id** | **String** | | [optional] | ## Example @@ -60,7 +61,8 @@ instance = FastCommentsClient::CommentData.new( autoplay_delay_ms: null, feedback_ids: null, question_values: null, - tos: null + tos: null, + bot_id: null ) ``` diff --git a/client/docs/CommentLogData.md b/client/docs/CommentLogData.md index 4536816..ad45edc 100644 --- a/client/docs/CommentLogData.md +++ b/client/docs/CommentLogData.md @@ -19,6 +19,7 @@ | **engine_response** | **String** | | [optional] | | **engine_tokens** | **Float** | | [optional] | | **trust_factor** | **Float** | | [optional] | +| **source** | **String** | | [optional] | | **rule** | [**SpamRule**](SpamRule.md) | | [optional] | | **user_id** | **String** | | [optional] | | **subscribers** | **Float** | | [optional] | @@ -72,6 +73,7 @@ instance = FastCommentsClient::CommentLogData.new( engine_response: null, engine_tokens: null, trust_factor: null, + source: null, rule: null, user_id: null, subscribers: null, diff --git a/client/docs/CommentsByIdsParams.md b/client/docs/CommentsByIdsParams.md new file mode 100644 index 0000000..b1630d0 --- /dev/null +++ b/client/docs/CommentsByIdsParams.md @@ -0,0 +1,18 @@ +# FastCommentsClient::CommentsByIdsParams + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | **Array<String>** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::CommentsByIdsParams.new( + ids: null +) +``` + diff --git a/client/docs/CreateCommentParams.md b/client/docs/CreateCommentParams.md index 92ef54f..edcbac9 100644 --- a/client/docs/CreateCommentParams.md +++ b/client/docs/CreateCommentParams.md @@ -27,8 +27,9 @@ | **from_offline_restore** | **Boolean** | | [optional] | | **autoplay_delay_ms** | **Integer** | | [optional] | | **feedback_ids** | **Array<String>** | | [optional] | -| **question_values** | [**Hash<String, RecordStringStringOrNumberValue>**](RecordStringStringOrNumberValue.md) | Construct a type with a set of properties K of type T | [optional] | +| **question_values** | [**Hash<String, GifSearchResponseImagesInnerInner>**](GifSearchResponseImagesInnerInner.md) | Construct a type with a set of properties K of type T | [optional] | | **tos** | **Boolean** | | [optional] | +| **bot_id** | **String** | | [optional] | | **approved** | **Boolean** | | [optional] | | **domain** | **String** | | [optional] | | **ip** | **String** | | [optional] | @@ -71,6 +72,7 @@ instance = FastCommentsClient::CreateCommentParams.new( feedback_ids: null, question_values: null, tos: null, + bot_id: null, approved: null, domain: null, ip: null, diff --git a/client/docs/CreateCommentPublic200Response.md b/client/docs/CreateCommentPublic200Response.md deleted file mode 100644 index 038a86e..0000000 --- a/client/docs/CreateCommentPublic200Response.md +++ /dev/null @@ -1,40 +0,0 @@ -# FastCommentsClient::CreateCommentPublic200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **comment** | [**PublicComment**](PublicComment.md) | | | -| **user** | [**UserSessionInfo**](UserSessionInfo.md) | | | -| **module_data** | **Hash<String, Object>** | Construct a type with a set of properties K of type T | [optional] | -| **user_id_ws** | **String** | | [optional] | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::CreateCommentPublic200Response.new( - status: null, - comment: null, - user: null, - module_data: null, - user_id_ws: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/CreateEmailTemplate200Response.md b/client/docs/CreateEmailTemplate200Response.md deleted file mode 100644 index 6c4c8b5..0000000 --- a/client/docs/CreateEmailTemplate200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::CreateEmailTemplate200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **email_template** | [**CustomEmailTemplate**](CustomEmailTemplate.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::CreateEmailTemplate200Response.new( - status: null, - email_template: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/CreateFeedPost200Response.md b/client/docs/CreateFeedPost200Response.md deleted file mode 100644 index e2a87f8..0000000 --- a/client/docs/CreateFeedPost200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::CreateFeedPost200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **feed_post** | [**FeedPost**](FeedPost.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::CreateFeedPost200Response.new( - status: null, - feed_post: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/CreateFeedPostPublic200Response.md b/client/docs/CreateFeedPostPublic200Response.md deleted file mode 100644 index 0e491cf..0000000 --- a/client/docs/CreateFeedPostPublic200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::CreateFeedPostPublic200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **feed_post** | [**FeedPost**](FeedPost.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::CreateFeedPostPublic200Response.new( - status: null, - feed_post: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/CreateModerator200Response.md b/client/docs/CreateModerator200Response.md deleted file mode 100644 index 9126e85..0000000 --- a/client/docs/CreateModerator200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::CreateModerator200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **moderator** | [**Moderator**](Moderator.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::CreateModerator200Response.new( - status: null, - moderator: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/CreateQuestionConfig200Response.md b/client/docs/CreateQuestionConfig200Response.md deleted file mode 100644 index 967e739..0000000 --- a/client/docs/CreateQuestionConfig200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::CreateQuestionConfig200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **question_config** | [**QuestionConfig**](QuestionConfig.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::CreateQuestionConfig200Response.new( - status: null, - question_config: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/CreateQuestionResult200Response.md b/client/docs/CreateQuestionResult200Response.md deleted file mode 100644 index a253a3f..0000000 --- a/client/docs/CreateQuestionResult200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::CreateQuestionResult200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **question_result** | [**QuestionResult**](QuestionResult.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::CreateQuestionResult200Response.new( - status: null, - question_result: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/CreateTenant200Response.md b/client/docs/CreateTenant200Response.md deleted file mode 100644 index fbdc522..0000000 --- a/client/docs/CreateTenant200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::CreateTenant200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **tenant** | [**APITenant**](APITenant.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::CreateTenant200Response.new( - status: null, - tenant: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/CreateTenantPackage200Response.md b/client/docs/CreateTenantPackage200Response.md deleted file mode 100644 index 8bbd588..0000000 --- a/client/docs/CreateTenantPackage200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::CreateTenantPackage200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **tenant_package** | [**TenantPackage**](TenantPackage.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::CreateTenantPackage200Response.new( - status: null, - tenant_package: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/CreateTenantPackageBody.md b/client/docs/CreateTenantPackageBody.md index bccfb5c..ba9419b 100644 --- a/client/docs/CreateTenantPackageBody.md +++ b/client/docs/CreateTenantPackageBody.md @@ -45,8 +45,8 @@ | **flex_admin_unit** | **Float** | | [optional] | | **flex_domain_cost_cents** | **Float** | | [optional] | | **flex_domain_unit** | **Float** | | [optional] | -| **flex_chat_gpt_cost_cents** | **Float** | | [optional] | -| **flex_chat_gpt_unit** | **Float** | | [optional] | +| **flex_llm_cost_cents** | **Float** | | [optional] | +| **flex_llm_unit** | **Float** | | [optional] | | **flex_minimum_cost_cents** | **Float** | | [optional] | | **flex_managed_tenant_cost_cents** | **Float** | | [optional] | | **flex_sso_admin_cost_cents** | **Float** | | [optional] | @@ -101,8 +101,8 @@ instance = FastCommentsClient::CreateTenantPackageBody.new( flex_admin_unit: null, flex_domain_cost_cents: null, flex_domain_unit: null, - flex_chat_gpt_cost_cents: null, - flex_chat_gpt_unit: null, + flex_llm_cost_cents: null, + flex_llm_unit: null, flex_minimum_cost_cents: null, flex_managed_tenant_cost_cents: null, flex_sso_admin_cost_cents: null, diff --git a/client/docs/CreateTenantUser200Response.md b/client/docs/CreateTenantUser200Response.md deleted file mode 100644 index 33db806..0000000 --- a/client/docs/CreateTenantUser200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::CreateTenantUser200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **tenant_user** | [**User**](User.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::CreateTenantUser200Response.new( - status: null, - tenant_user: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/CreateTicket200Response.md b/client/docs/CreateTicket200Response.md deleted file mode 100644 index 374e68e..0000000 --- a/client/docs/CreateTicket200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::CreateTicket200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **ticket** | [**APITicket**](APITicket.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::CreateTicket200Response.new( - status: null, - ticket: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/CreateUserBadge200Response.md b/client/docs/CreateUserBadge200Response.md deleted file mode 100644 index db7ed2a..0000000 --- a/client/docs/CreateUserBadge200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# FastCommentsClient::CreateUserBadge200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **user_badge** | [**UserBadge**](UserBadge.md) | | | -| **notes** | **Array<String>** | | [optional] | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::CreateUserBadge200Response.new( - status: null, - user_badge: null, - notes: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/CreateV1PageReact.md b/client/docs/CreateV1PageReact.md new file mode 100644 index 0000000..72d9aaa --- /dev/null +++ b/client/docs/CreateV1PageReact.md @@ -0,0 +1,20 @@ +# FastCommentsClient::CreateV1PageReact + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **code** | **String** | | [optional] | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::CreateV1PageReact.new( + code: null, + status: null +) +``` + diff --git a/client/docs/CustomConfigParameters.md b/client/docs/CustomConfigParameters.md index 51e4b9f..13063b2 100644 --- a/client/docs/CustomConfigParameters.md +++ b/client/docs/CustomConfigParameters.md @@ -56,11 +56,14 @@ | **no_custom_config** | **Boolean** | | [optional] | | **mention_auto_complete_mode** | [**MentionAutoCompleteMode**](MentionAutoCompleteMode.md) | | [optional] | | **no_image_uploads** | **Boolean** | | [optional] | +| **allow_embeds** | **Boolean** | | [optional] | +| **allowed_embed_domains** | **Array<String>** | | [optional] | | **no_styles** | **Boolean** | | [optional] | | **page_size** | **Integer** | | [optional] | | **readonly** | **Boolean** | | [optional] | | **no_new_root_comments** | **Boolean** | | [optional] | | **require_sso** | **Boolean** | | [optional] | +| **enable_f_chat** | **Boolean** | | [optional] | | **enable_resize_handle** | **Boolean** | | [optional] | | **restricted_link_domains** | **Array<String>** | | [optional] | | **show_badges_in_top_bar** | **Boolean** | | [optional] | @@ -81,6 +84,8 @@ | **widget_questions_required** | [**CommentQuestionsRequired**](CommentQuestionsRequired.md) | | [optional] | | **widget_sub_question_visibility** | [**QuestionSubQuestionVisibility**](QuestionSubQuestionVisibility.md) | | [optional] | | **wrap** | **Boolean** | | [optional] | +| **users_list_location** | [**UsersListLocation**](UsersListLocation.md) | | [optional] | +| **users_list_include_offline** | **Boolean** | | [optional] | | **ticket_base_url** | **String** | | [optional] | | **ticket_kb_search_endpoint** | **String** | | [optional] | | **ticket_file_uploads_enabled** | **Boolean** | | [optional] | @@ -146,11 +151,14 @@ instance = FastCommentsClient::CustomConfigParameters.new( no_custom_config: null, mention_auto_complete_mode: null, no_image_uploads: null, + allow_embeds: null, + allowed_embed_domains: null, no_styles: null, page_size: null, readonly: null, no_new_root_comments: null, require_sso: null, + enable_f_chat: null, enable_resize_handle: null, restricted_link_domains: null, show_badges_in_top_bar: null, @@ -171,6 +179,8 @@ instance = FastCommentsClient::CustomConfigParameters.new( widget_questions_required: null, widget_sub_question_visibility: null, wrap: null, + users_list_location: null, + users_list_include_offline: null, ticket_base_url: null, ticket_kb_search_endpoint: null, ticket_file_uploads_enabled: null, diff --git a/client/docs/DefaultApi.md b/client/docs/DefaultApi.md index d0a4561..7b9d22b 100644 --- a/client/docs/DefaultApi.md +++ b/client/docs/DefaultApi.md @@ -122,7 +122,7 @@ All URIs are relative to *https://fastcomments.com* ## add_domain_config -> add_domain_config(tenant_id, add_domain_config_params) +> add_domain_config(tenant_id, add_domain_config_params) @@ -156,7 +156,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> add_domain_config_with_http_info(tenant_id, add_domain_config_params) +> , Integer, Hash)> add_domain_config_with_http_info(tenant_id, add_domain_config_params) ```ruby begin @@ -164,7 +164,7 @@ begin data, status_code, headers = api_instance.add_domain_config_with_http_info(tenant_id, add_domain_config_params) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->add_domain_config_with_http_info: #{e}" end @@ -179,7 +179,7 @@ end ### Return type -[**AddDomainConfig200Response**](AddDomainConfig200Response.md) +[**AddDomainConfigResponse**](AddDomainConfigResponse.md) ### Authorization @@ -193,7 +193,7 @@ end ## add_hash_tag -> add_hash_tag(opts) +> add_hash_tag(opts) @@ -229,7 +229,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> add_hash_tag_with_http_info(opts) +> , Integer, Hash)> add_hash_tag_with_http_info(opts) ```ruby begin @@ -237,7 +237,7 @@ begin data, status_code, headers = api_instance.add_hash_tag_with_http_info(opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->add_hash_tag_with_http_info: #{e}" end @@ -252,7 +252,7 @@ end ### Return type -[**AddHashTag200Response**](AddHashTag200Response.md) +[**CreateHashTagResponse**](CreateHashTagResponse.md) ### Authorization @@ -266,7 +266,7 @@ end ## add_hash_tags_bulk -> add_hash_tags_bulk(opts) +> add_hash_tags_bulk(opts) @@ -302,7 +302,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> add_hash_tags_bulk_with_http_info(opts) +> , Integer, Hash)> add_hash_tags_bulk_with_http_info(opts) ```ruby begin @@ -310,7 +310,7 @@ begin data, status_code, headers = api_instance.add_hash_tags_bulk_with_http_info(opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->add_hash_tags_bulk_with_http_info: #{e}" end @@ -325,7 +325,7 @@ end ### Return type -[**AddHashTagsBulk200Response**](AddHashTagsBulk200Response.md) +[**BulkCreateHashTagsResponse**](BulkCreateHashTagsResponse.md) ### Authorization @@ -481,7 +481,7 @@ end ## aggregate -> aggregate(tenant_id, aggregation_request, opts) +> aggregate(tenant_id, aggregation_request, opts) @@ -521,7 +521,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> aggregate_with_http_info(tenant_id, aggregation_request, opts) +> , Integer, Hash)> aggregate_with_http_info(tenant_id, aggregation_request, opts) ```ruby begin @@ -529,7 +529,7 @@ begin data, status_code, headers = api_instance.aggregate_with_http_info(tenant_id, aggregation_request, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->aggregate_with_http_info: #{e}" end @@ -546,7 +546,7 @@ end ### Return type -[**AggregationResponse**](AggregationResponse.md) +[**AggregateResponse**](AggregateResponse.md) ### Authorization @@ -560,7 +560,7 @@ end ## aggregate_question_results -> aggregate_question_results(tenant_id, opts) +> aggregate_question_results(tenant_id, opts) @@ -601,7 +601,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> aggregate_question_results_with_http_info(tenant_id, opts) +> , Integer, Hash)> aggregate_question_results_with_http_info(tenant_id, opts) ```ruby begin @@ -609,7 +609,7 @@ begin data, status_code, headers = api_instance.aggregate_question_results_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->aggregate_question_results_with_http_info: #{e}" end @@ -629,7 +629,7 @@ end ### Return type -[**AggregateQuestionResults200Response**](AggregateQuestionResults200Response.md) +[**AggregateQuestionResultsResponse**](AggregateQuestionResultsResponse.md) ### Authorization @@ -643,7 +643,7 @@ end ## block_user_from_comment -> block_user_from_comment(tenant_id, id, block_from_comment_params, opts) +> block_user_from_comment(tenant_id, id, block_from_comment_params, opts) @@ -682,7 +682,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> block_user_from_comment_with_http_info(tenant_id, id, block_from_comment_params, opts) +> , Integer, Hash)> block_user_from_comment_with_http_info(tenant_id, id, block_from_comment_params, opts) ```ruby begin @@ -690,7 +690,7 @@ begin data, status_code, headers = api_instance.block_user_from_comment_with_http_info(tenant_id, id, block_from_comment_params, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->block_user_from_comment_with_http_info: #{e}" end @@ -708,7 +708,7 @@ end ### Return type -[**BlockFromCommentPublic200Response**](BlockFromCommentPublic200Response.md) +[**BlockSuccess**](BlockSuccess.md) ### Authorization @@ -722,7 +722,7 @@ end ## bulk_aggregate_question_results -> bulk_aggregate_question_results(tenant_id, bulk_aggregate_question_results_request, opts) +> bulk_aggregate_question_results(tenant_id, bulk_aggregate_question_results_request, opts) @@ -759,7 +759,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> bulk_aggregate_question_results_with_http_info(tenant_id, bulk_aggregate_question_results_request, opts) +> , Integer, Hash)> bulk_aggregate_question_results_with_http_info(tenant_id, bulk_aggregate_question_results_request, opts) ```ruby begin @@ -767,7 +767,7 @@ begin data, status_code, headers = api_instance.bulk_aggregate_question_results_with_http_info(tenant_id, bulk_aggregate_question_results_request, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->bulk_aggregate_question_results_with_http_info: #{e}" end @@ -783,7 +783,7 @@ end ### Return type -[**BulkAggregateQuestionResults200Response**](BulkAggregateQuestionResults200Response.md) +[**BulkAggregateQuestionResultsResponse**](BulkAggregateQuestionResultsResponse.md) ### Authorization @@ -797,7 +797,7 @@ end ## change_ticket_state -> change_ticket_state(tenant_id, user_id, id, change_ticket_state_body) +> change_ticket_state(tenant_id, user_id, id, change_ticket_state_body) @@ -833,7 +833,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> change_ticket_state_with_http_info(tenant_id, user_id, id, change_ticket_state_body) +> , Integer, Hash)> change_ticket_state_with_http_info(tenant_id, user_id, id, change_ticket_state_body) ```ruby begin @@ -841,7 +841,7 @@ begin data, status_code, headers = api_instance.change_ticket_state_with_http_info(tenant_id, user_id, id, change_ticket_state_body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->change_ticket_state_with_http_info: #{e}" end @@ -858,7 +858,7 @@ end ### Return type -[**ChangeTicketState200Response**](ChangeTicketState200Response.md) +[**ChangeTicketStateResponse**](ChangeTicketStateResponse.md) ### Authorization @@ -872,7 +872,7 @@ end ## combine_comments_with_question_results -> combine_comments_with_question_results(tenant_id, opts) +> combine_comments_with_question_results(tenant_id, opts) @@ -915,7 +915,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> combine_comments_with_question_results_with_http_info(tenant_id, opts) +> , Integer, Hash)> combine_comments_with_question_results_with_http_info(tenant_id, opts) ```ruby begin @@ -923,7 +923,7 @@ begin data, status_code, headers = api_instance.combine_comments_with_question_results_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->combine_comments_with_question_results_with_http_info: #{e}" end @@ -945,7 +945,7 @@ end ### Return type -[**CombineCommentsWithQuestionResults200Response**](CombineCommentsWithQuestionResults200Response.md) +[**CombineQuestionResultsWithCommentsResponse**](CombineQuestionResultsWithCommentsResponse.md) ### Authorization @@ -959,7 +959,7 @@ end ## create_email_template -> create_email_template(tenant_id, create_email_template_body) +> create_email_template(tenant_id, create_email_template_body) @@ -993,7 +993,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> create_email_template_with_http_info(tenant_id, create_email_template_body) +> , Integer, Hash)> create_email_template_with_http_info(tenant_id, create_email_template_body) ```ruby begin @@ -1001,7 +1001,7 @@ begin data, status_code, headers = api_instance.create_email_template_with_http_info(tenant_id, create_email_template_body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->create_email_template_with_http_info: #{e}" end @@ -1016,7 +1016,7 @@ end ### Return type -[**CreateEmailTemplate200Response**](CreateEmailTemplate200Response.md) +[**CreateEmailTemplateResponse**](CreateEmailTemplateResponse.md) ### Authorization @@ -1030,7 +1030,7 @@ end ## create_feed_post -> create_feed_post(tenant_id, create_feed_post_params, opts) +> create_feed_post(tenant_id, create_feed_post_params, opts) @@ -1070,7 +1070,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> create_feed_post_with_http_info(tenant_id, create_feed_post_params, opts) +> , Integer, Hash)> create_feed_post_with_http_info(tenant_id, create_feed_post_params, opts) ```ruby begin @@ -1078,7 +1078,7 @@ begin data, status_code, headers = api_instance.create_feed_post_with_http_info(tenant_id, create_feed_post_params, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->create_feed_post_with_http_info: #{e}" end @@ -1097,7 +1097,7 @@ end ### Return type -[**CreateFeedPost200Response**](CreateFeedPost200Response.md) +[**CreateFeedPostsResponse**](CreateFeedPostsResponse.md) ### Authorization @@ -1111,7 +1111,7 @@ end ## create_moderator -> create_moderator(tenant_id, create_moderator_body) +> create_moderator(tenant_id, create_moderator_body) @@ -1145,7 +1145,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> create_moderator_with_http_info(tenant_id, create_moderator_body) +> , Integer, Hash)> create_moderator_with_http_info(tenant_id, create_moderator_body) ```ruby begin @@ -1153,7 +1153,7 @@ begin data, status_code, headers = api_instance.create_moderator_with_http_info(tenant_id, create_moderator_body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->create_moderator_with_http_info: #{e}" end @@ -1168,7 +1168,7 @@ end ### Return type -[**CreateModerator200Response**](CreateModerator200Response.md) +[**CreateModeratorResponse**](CreateModeratorResponse.md) ### Authorization @@ -1182,7 +1182,7 @@ end ## create_question_config -> create_question_config(tenant_id, create_question_config_body) +> create_question_config(tenant_id, create_question_config_body) @@ -1216,7 +1216,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> create_question_config_with_http_info(tenant_id, create_question_config_body) +> , Integer, Hash)> create_question_config_with_http_info(tenant_id, create_question_config_body) ```ruby begin @@ -1224,7 +1224,7 @@ begin data, status_code, headers = api_instance.create_question_config_with_http_info(tenant_id, create_question_config_body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->create_question_config_with_http_info: #{e}" end @@ -1239,7 +1239,7 @@ end ### Return type -[**CreateQuestionConfig200Response**](CreateQuestionConfig200Response.md) +[**CreateQuestionConfigResponse**](CreateQuestionConfigResponse.md) ### Authorization @@ -1253,7 +1253,7 @@ end ## create_question_result -> create_question_result(tenant_id, create_question_result_body) +> create_question_result(tenant_id, create_question_result_body) @@ -1287,7 +1287,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> create_question_result_with_http_info(tenant_id, create_question_result_body) +> , Integer, Hash)> create_question_result_with_http_info(tenant_id, create_question_result_body) ```ruby begin @@ -1295,7 +1295,7 @@ begin data, status_code, headers = api_instance.create_question_result_with_http_info(tenant_id, create_question_result_body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->create_question_result_with_http_info: #{e}" end @@ -1310,7 +1310,7 @@ end ### Return type -[**CreateQuestionResult200Response**](CreateQuestionResult200Response.md) +[**CreateQuestionResultResponse**](CreateQuestionResultResponse.md) ### Authorization @@ -1395,7 +1395,7 @@ end ## create_tenant -> create_tenant(tenant_id, create_tenant_body) +> create_tenant(tenant_id, create_tenant_body) @@ -1429,7 +1429,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> create_tenant_with_http_info(tenant_id, create_tenant_body) +> , Integer, Hash)> create_tenant_with_http_info(tenant_id, create_tenant_body) ```ruby begin @@ -1437,7 +1437,7 @@ begin data, status_code, headers = api_instance.create_tenant_with_http_info(tenant_id, create_tenant_body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->create_tenant_with_http_info: #{e}" end @@ -1452,7 +1452,7 @@ end ### Return type -[**CreateTenant200Response**](CreateTenant200Response.md) +[**CreateTenantResponse**](CreateTenantResponse.md) ### Authorization @@ -1466,7 +1466,7 @@ end ## create_tenant_package -> create_tenant_package(tenant_id, create_tenant_package_body) +> create_tenant_package(tenant_id, create_tenant_package_body) @@ -1500,7 +1500,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> create_tenant_package_with_http_info(tenant_id, create_tenant_package_body) +> , Integer, Hash)> create_tenant_package_with_http_info(tenant_id, create_tenant_package_body) ```ruby begin @@ -1508,7 +1508,7 @@ begin data, status_code, headers = api_instance.create_tenant_package_with_http_info(tenant_id, create_tenant_package_body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->create_tenant_package_with_http_info: #{e}" end @@ -1523,7 +1523,7 @@ end ### Return type -[**CreateTenantPackage200Response**](CreateTenantPackage200Response.md) +[**CreateTenantPackageResponse**](CreateTenantPackageResponse.md) ### Authorization @@ -1537,7 +1537,7 @@ end ## create_tenant_user -> create_tenant_user(tenant_id, create_tenant_user_body) +> create_tenant_user(tenant_id, create_tenant_user_body) @@ -1571,7 +1571,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> create_tenant_user_with_http_info(tenant_id, create_tenant_user_body) +> , Integer, Hash)> create_tenant_user_with_http_info(tenant_id, create_tenant_user_body) ```ruby begin @@ -1579,7 +1579,7 @@ begin data, status_code, headers = api_instance.create_tenant_user_with_http_info(tenant_id, create_tenant_user_body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->create_tenant_user_with_http_info: #{e}" end @@ -1594,7 +1594,7 @@ end ### Return type -[**CreateTenantUser200Response**](CreateTenantUser200Response.md) +[**CreateTenantUserResponse**](CreateTenantUserResponse.md) ### Authorization @@ -1608,7 +1608,7 @@ end ## create_ticket -> create_ticket(tenant_id, user_id, create_ticket_body) +> create_ticket(tenant_id, user_id, create_ticket_body) @@ -1643,7 +1643,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> create_ticket_with_http_info(tenant_id, user_id, create_ticket_body) +> , Integer, Hash)> create_ticket_with_http_info(tenant_id, user_id, create_ticket_body) ```ruby begin @@ -1651,7 +1651,7 @@ begin data, status_code, headers = api_instance.create_ticket_with_http_info(tenant_id, user_id, create_ticket_body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->create_ticket_with_http_info: #{e}" end @@ -1667,7 +1667,7 @@ end ### Return type -[**CreateTicket200Response**](CreateTicket200Response.md) +[**CreateTicketResponse**](CreateTicketResponse.md) ### Authorization @@ -1681,7 +1681,7 @@ end ## create_user_badge -> create_user_badge(tenant_id, create_user_badge_params) +> create_user_badge(tenant_id, create_user_badge_params) @@ -1715,7 +1715,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> create_user_badge_with_http_info(tenant_id, create_user_badge_params) +> , Integer, Hash)> create_user_badge_with_http_info(tenant_id, create_user_badge_params) ```ruby begin @@ -1723,7 +1723,7 @@ begin data, status_code, headers = api_instance.create_user_badge_with_http_info(tenant_id, create_user_badge_params) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->create_user_badge_with_http_info: #{e}" end @@ -1738,7 +1738,7 @@ end ### Return type -[**CreateUserBadge200Response**](CreateUserBadge200Response.md) +[**APICreateUserBadgeResponse**](APICreateUserBadgeResponse.md) ### Authorization @@ -1752,7 +1752,7 @@ end ## create_vote -> create_vote(tenant_id, comment_id, direction, opts) +> create_vote(tenant_id, comment_id, direction, opts) @@ -1791,7 +1791,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> create_vote_with_http_info(tenant_id, comment_id, direction, opts) +> , Integer, Hash)> create_vote_with_http_info(tenant_id, comment_id, direction, opts) ```ruby begin @@ -1799,7 +1799,7 @@ begin data, status_code, headers = api_instance.create_vote_with_http_info(tenant_id, comment_id, direction, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->create_vote_with_http_info: #{e}" end @@ -1817,7 +1817,7 @@ end ### Return type -[**VoteComment200Response**](VoteComment200Response.md) +[**VoteResponse**](VoteResponse.md) ### Authorization @@ -1831,7 +1831,7 @@ end ## delete_comment -> delete_comment(tenant_id, id, opts) +> delete_comment(tenant_id, id, opts) @@ -1869,7 +1869,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_comment_with_http_info(tenant_id, id, opts) +> , Integer, Hash)> delete_comment_with_http_info(tenant_id, id, opts) ```ruby begin @@ -1877,7 +1877,7 @@ begin data, status_code, headers = api_instance.delete_comment_with_http_info(tenant_id, id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->delete_comment_with_http_info: #{e}" end @@ -1894,7 +1894,7 @@ end ### Return type -[**DeleteComment200Response**](DeleteComment200Response.md) +[**DeleteCommentResult**](DeleteCommentResult.md) ### Authorization @@ -1908,7 +1908,7 @@ end ## delete_domain_config -> delete_domain_config(tenant_id, domain) +> delete_domain_config(tenant_id, domain) @@ -1942,7 +1942,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_domain_config_with_http_info(tenant_id, domain) +> , Integer, Hash)> delete_domain_config_with_http_info(tenant_id, domain) ```ruby begin @@ -1950,7 +1950,7 @@ begin data, status_code, headers = api_instance.delete_domain_config_with_http_info(tenant_id, domain) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->delete_domain_config_with_http_info: #{e}" end @@ -1965,7 +1965,7 @@ end ### Return type -[**DeleteDomainConfig200Response**](DeleteDomainConfig200Response.md) +[**DeleteDomainConfigResponse**](DeleteDomainConfigResponse.md) ### Authorization @@ -1979,7 +1979,7 @@ end ## delete_email_template -> delete_email_template(tenant_id, id) +> delete_email_template(tenant_id, id) @@ -2013,7 +2013,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_email_template_with_http_info(tenant_id, id) +> , Integer, Hash)> delete_email_template_with_http_info(tenant_id, id) ```ruby begin @@ -2021,7 +2021,7 @@ begin data, status_code, headers = api_instance.delete_email_template_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->delete_email_template_with_http_info: #{e}" end @@ -2036,7 +2036,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -2050,7 +2050,7 @@ end ## delete_email_template_render_error -> delete_email_template_render_error(tenant_id, id, error_id) +> delete_email_template_render_error(tenant_id, id, error_id) @@ -2085,7 +2085,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_email_template_render_error_with_http_info(tenant_id, id, error_id) +> , Integer, Hash)> delete_email_template_render_error_with_http_info(tenant_id, id, error_id) ```ruby begin @@ -2093,7 +2093,7 @@ begin data, status_code, headers = api_instance.delete_email_template_render_error_with_http_info(tenant_id, id, error_id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->delete_email_template_render_error_with_http_info: #{e}" end @@ -2109,7 +2109,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -2123,7 +2123,7 @@ end ## delete_hash_tag -> delete_hash_tag(tag, opts) +> delete_hash_tag(tag, opts) @@ -2144,7 +2144,7 @@ api_instance = FastCommentsClient::DefaultApi.new tag = 'tag_example' # String | opts = { tenant_id: 'tenant_id_example', # String | - delete_hash_tag_request: FastCommentsClient::DeleteHashTagRequest.new # DeleteHashTagRequest | + delete_hash_tag_request_body: FastCommentsClient::DeleteHashTagRequestBody.new # DeleteHashTagRequestBody | } begin @@ -2160,7 +2160,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_hash_tag_with_http_info(tag, opts) +> , Integer, Hash)> delete_hash_tag_with_http_info(tag, opts) ```ruby begin @@ -2168,7 +2168,7 @@ begin data, status_code, headers = api_instance.delete_hash_tag_with_http_info(tag, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->delete_hash_tag_with_http_info: #{e}" end @@ -2180,11 +2180,11 @@ end | ---- | ---- | ----------- | ----- | | **tag** | **String** | | | | **tenant_id** | **String** | | [optional] | -| **delete_hash_tag_request** | [**DeleteHashTagRequest**](DeleteHashTagRequest.md) | | [optional] | +| **delete_hash_tag_request_body** | [**DeleteHashTagRequestBody**](DeleteHashTagRequestBody.md) | | [optional] | ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -2198,7 +2198,7 @@ end ## delete_moderator -> delete_moderator(tenant_id, id, opts) +> delete_moderator(tenant_id, id, opts) @@ -2235,7 +2235,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_moderator_with_http_info(tenant_id, id, opts) +> , Integer, Hash)> delete_moderator_with_http_info(tenant_id, id, opts) ```ruby begin @@ -2243,7 +2243,7 @@ begin data, status_code, headers = api_instance.delete_moderator_with_http_info(tenant_id, id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->delete_moderator_with_http_info: #{e}" end @@ -2259,7 +2259,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -2273,7 +2273,7 @@ end ## delete_notification_count -> delete_notification_count(tenant_id, id) +> delete_notification_count(tenant_id, id) @@ -2307,7 +2307,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_notification_count_with_http_info(tenant_id, id) +> , Integer, Hash)> delete_notification_count_with_http_info(tenant_id, id) ```ruby begin @@ -2315,7 +2315,7 @@ begin data, status_code, headers = api_instance.delete_notification_count_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->delete_notification_count_with_http_info: #{e}" end @@ -2330,7 +2330,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -2415,7 +2415,7 @@ end ## delete_pending_webhook_event -> delete_pending_webhook_event(tenant_id, id) +> delete_pending_webhook_event(tenant_id, id) @@ -2449,7 +2449,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_pending_webhook_event_with_http_info(tenant_id, id) +> , Integer, Hash)> delete_pending_webhook_event_with_http_info(tenant_id, id) ```ruby begin @@ -2457,7 +2457,7 @@ begin data, status_code, headers = api_instance.delete_pending_webhook_event_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->delete_pending_webhook_event_with_http_info: #{e}" end @@ -2472,7 +2472,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -2486,7 +2486,7 @@ end ## delete_question_config -> delete_question_config(tenant_id, id) +> delete_question_config(tenant_id, id) @@ -2520,7 +2520,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_question_config_with_http_info(tenant_id, id) +> , Integer, Hash)> delete_question_config_with_http_info(tenant_id, id) ```ruby begin @@ -2528,7 +2528,7 @@ begin data, status_code, headers = api_instance.delete_question_config_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->delete_question_config_with_http_info: #{e}" end @@ -2543,7 +2543,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -2557,7 +2557,7 @@ end ## delete_question_result -> delete_question_result(tenant_id, id) +> delete_question_result(tenant_id, id) @@ -2591,7 +2591,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_question_result_with_http_info(tenant_id, id) +> , Integer, Hash)> delete_question_result_with_http_info(tenant_id, id) ```ruby begin @@ -2599,7 +2599,7 @@ begin data, status_code, headers = api_instance.delete_question_result_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->delete_question_result_with_http_info: #{e}" end @@ -2614,7 +2614,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -2780,7 +2780,7 @@ end ## delete_tenant -> delete_tenant(tenant_id, id, opts) +> delete_tenant(tenant_id, id, opts) @@ -2817,7 +2817,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_tenant_with_http_info(tenant_id, id, opts) +> , Integer, Hash)> delete_tenant_with_http_info(tenant_id, id, opts) ```ruby begin @@ -2825,7 +2825,7 @@ begin data, status_code, headers = api_instance.delete_tenant_with_http_info(tenant_id, id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->delete_tenant_with_http_info: #{e}" end @@ -2841,7 +2841,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -2855,7 +2855,7 @@ end ## delete_tenant_package -> delete_tenant_package(tenant_id, id) +> delete_tenant_package(tenant_id, id) @@ -2889,7 +2889,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_tenant_package_with_http_info(tenant_id, id) +> , Integer, Hash)> delete_tenant_package_with_http_info(tenant_id, id) ```ruby begin @@ -2897,7 +2897,7 @@ begin data, status_code, headers = api_instance.delete_tenant_package_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->delete_tenant_package_with_http_info: #{e}" end @@ -2912,7 +2912,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -2926,7 +2926,7 @@ end ## delete_tenant_user -> delete_tenant_user(tenant_id, id, opts) +> delete_tenant_user(tenant_id, id, opts) @@ -2964,7 +2964,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_tenant_user_with_http_info(tenant_id, id, opts) +> , Integer, Hash)> delete_tenant_user_with_http_info(tenant_id, id, opts) ```ruby begin @@ -2972,7 +2972,7 @@ begin data, status_code, headers = api_instance.delete_tenant_user_with_http_info(tenant_id, id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->delete_tenant_user_with_http_info: #{e}" end @@ -2989,7 +2989,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -3003,7 +3003,7 @@ end ## delete_user_badge -> delete_user_badge(tenant_id, id) +> delete_user_badge(tenant_id, id) @@ -3037,7 +3037,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_user_badge_with_http_info(tenant_id, id) +> , Integer, Hash)> delete_user_badge_with_http_info(tenant_id, id) ```ruby begin @@ -3045,7 +3045,7 @@ begin data, status_code, headers = api_instance.delete_user_badge_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->delete_user_badge_with_http_info: #{e}" end @@ -3060,7 +3060,7 @@ end ### Return type -[**UpdateUserBadge200Response**](UpdateUserBadge200Response.md) +[**APIEmptySuccessResponse**](APIEmptySuccessResponse.md) ### Authorization @@ -3074,7 +3074,7 @@ end ## delete_vote -> delete_vote(tenant_id, id, opts) +> delete_vote(tenant_id, id, opts) @@ -3111,7 +3111,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_vote_with_http_info(tenant_id, id, opts) +> , Integer, Hash)> delete_vote_with_http_info(tenant_id, id, opts) ```ruby begin @@ -3119,7 +3119,7 @@ begin data, status_code, headers = api_instance.delete_vote_with_http_info(tenant_id, id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->delete_vote_with_http_info: #{e}" end @@ -3135,7 +3135,7 @@ end ### Return type -[**DeleteCommentVote200Response**](DeleteCommentVote200Response.md) +[**VoteDeleteResponse**](VoteDeleteResponse.md) ### Authorization @@ -3149,7 +3149,7 @@ end ## flag_comment -> flag_comment(tenant_id, id, opts) +> flag_comment(tenant_id, id, opts) @@ -3187,7 +3187,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> flag_comment_with_http_info(tenant_id, id, opts) +> , Integer, Hash)> flag_comment_with_http_info(tenant_id, id, opts) ```ruby begin @@ -3195,7 +3195,7 @@ begin data, status_code, headers = api_instance.flag_comment_with_http_info(tenant_id, id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->flag_comment_with_http_info: #{e}" end @@ -3212,7 +3212,7 @@ end ### Return type -[**FlagComment200Response**](FlagComment200Response.md) +[**FlagCommentResponse**](FlagCommentResponse.md) ### Authorization @@ -3226,7 +3226,7 @@ end ## get_audit_logs -> get_audit_logs(tenant_id, opts) +> get_audit_logs(tenant_id, opts) @@ -3266,7 +3266,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_audit_logs_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_audit_logs_with_http_info(tenant_id, opts) ```ruby begin @@ -3274,7 +3274,7 @@ begin data, status_code, headers = api_instance.get_audit_logs_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_audit_logs_with_http_info: #{e}" end @@ -3293,7 +3293,7 @@ end ### Return type -[**GetAuditLogs200Response**](GetAuditLogs200Response.md) +[**GetAuditLogsResponse**](GetAuditLogsResponse.md) ### Authorization @@ -3307,7 +3307,7 @@ end ## get_cached_notification_count -> get_cached_notification_count(tenant_id, id) +> get_cached_notification_count(tenant_id, id) @@ -3341,7 +3341,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_cached_notification_count_with_http_info(tenant_id, id) +> , Integer, Hash)> get_cached_notification_count_with_http_info(tenant_id, id) ```ruby begin @@ -3349,7 +3349,7 @@ begin data, status_code, headers = api_instance.get_cached_notification_count_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_cached_notification_count_with_http_info: #{e}" end @@ -3364,7 +3364,7 @@ end ### Return type -[**GetCachedNotificationCount200Response**](GetCachedNotificationCount200Response.md) +[**GetCachedNotificationCountResponse**](GetCachedNotificationCountResponse.md) ### Authorization @@ -3378,7 +3378,7 @@ end ## get_comment -> get_comment(tenant_id, id) +> get_comment(tenant_id, id) @@ -3412,7 +3412,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_comment_with_http_info(tenant_id, id) +> , Integer, Hash)> get_comment_with_http_info(tenant_id, id) ```ruby begin @@ -3420,7 +3420,7 @@ begin data, status_code, headers = api_instance.get_comment_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_comment_with_http_info: #{e}" end @@ -3435,7 +3435,7 @@ end ### Return type -[**GetComment200Response**](GetComment200Response.md) +[**APIGetCommentResponse**](APIGetCommentResponse.md) ### Authorization @@ -3449,7 +3449,7 @@ end ## get_comments -> get_comments(tenant_id, opts) +> get_comments(tenant_id, opts) @@ -3482,7 +3482,9 @@ opts = { context_user_id: 'context_user_id_example', # String | hash_tag: 'hash_tag_example', # String | parent_id: 'parent_id_example', # String | - direction: FastCommentsClient::SortDirections::OF # SortDirections | + direction: FastCommentsClient::SortDirections::OF, # SortDirections | + from_date: 789, # Integer | + to_date: 789 # Integer | } begin @@ -3498,7 +3500,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_comments_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_comments_with_http_info(tenant_id, opts) ```ruby begin @@ -3506,7 +3508,7 @@ begin data, status_code, headers = api_instance.get_comments_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_comments_with_http_info: #{e}" end @@ -3531,10 +3533,12 @@ end | **hash_tag** | **String** | | [optional] | | **parent_id** | **String** | | [optional] | | **direction** | [**SortDirections**](.md) | | [optional] | +| **from_date** | **Integer** | | [optional] | +| **to_date** | **Integer** | | [optional] | ### Return type -[**GetComments200Response**](GetComments200Response.md) +[**APIGetCommentsResponse**](APIGetCommentsResponse.md) ### Authorization @@ -3548,7 +3552,7 @@ end ## get_domain_config -> get_domain_config(tenant_id, domain) +> get_domain_config(tenant_id, domain) @@ -3582,7 +3586,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_domain_config_with_http_info(tenant_id, domain) +> , Integer, Hash)> get_domain_config_with_http_info(tenant_id, domain) ```ruby begin @@ -3590,7 +3594,7 @@ begin data, status_code, headers = api_instance.get_domain_config_with_http_info(tenant_id, domain) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_domain_config_with_http_info: #{e}" end @@ -3605,7 +3609,7 @@ end ### Return type -[**GetDomainConfig200Response**](GetDomainConfig200Response.md) +[**GetDomainConfigResponse**](GetDomainConfigResponse.md) ### Authorization @@ -3619,7 +3623,7 @@ end ## get_domain_configs -> get_domain_configs(tenant_id) +> get_domain_configs(tenant_id) @@ -3652,7 +3656,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_domain_configs_with_http_info(tenant_id) +> , Integer, Hash)> get_domain_configs_with_http_info(tenant_id) ```ruby begin @@ -3660,7 +3664,7 @@ begin data, status_code, headers = api_instance.get_domain_configs_with_http_info(tenant_id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_domain_configs_with_http_info: #{e}" end @@ -3674,7 +3678,7 @@ end ### Return type -[**GetDomainConfigs200Response**](GetDomainConfigs200Response.md) +[**GetDomainConfigsResponse**](GetDomainConfigsResponse.md) ### Authorization @@ -3688,7 +3692,7 @@ end ## get_email_template -> get_email_template(tenant_id, id) +> get_email_template(tenant_id, id) @@ -3722,7 +3726,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_email_template_with_http_info(tenant_id, id) +> , Integer, Hash)> get_email_template_with_http_info(tenant_id, id) ```ruby begin @@ -3730,7 +3734,7 @@ begin data, status_code, headers = api_instance.get_email_template_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_email_template_with_http_info: #{e}" end @@ -3745,7 +3749,7 @@ end ### Return type -[**GetEmailTemplate200Response**](GetEmailTemplate200Response.md) +[**GetEmailTemplateResponse**](GetEmailTemplateResponse.md) ### Authorization @@ -3759,7 +3763,7 @@ end ## get_email_template_definitions -> get_email_template_definitions(tenant_id) +> get_email_template_definitions(tenant_id) @@ -3792,7 +3796,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_email_template_definitions_with_http_info(tenant_id) +> , Integer, Hash)> get_email_template_definitions_with_http_info(tenant_id) ```ruby begin @@ -3800,7 +3804,7 @@ begin data, status_code, headers = api_instance.get_email_template_definitions_with_http_info(tenant_id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_email_template_definitions_with_http_info: #{e}" end @@ -3814,7 +3818,7 @@ end ### Return type -[**GetEmailTemplateDefinitions200Response**](GetEmailTemplateDefinitions200Response.md) +[**GetEmailTemplateDefinitionsResponse**](GetEmailTemplateDefinitionsResponse.md) ### Authorization @@ -3828,7 +3832,7 @@ end ## get_email_template_render_errors -> get_email_template_render_errors(tenant_id, id, opts) +> get_email_template_render_errors(tenant_id, id, opts) @@ -3865,7 +3869,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_email_template_render_errors_with_http_info(tenant_id, id, opts) +> , Integer, Hash)> get_email_template_render_errors_with_http_info(tenant_id, id, opts) ```ruby begin @@ -3873,7 +3877,7 @@ begin data, status_code, headers = api_instance.get_email_template_render_errors_with_http_info(tenant_id, id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_email_template_render_errors_with_http_info: #{e}" end @@ -3889,7 +3893,7 @@ end ### Return type -[**GetEmailTemplateRenderErrors200Response**](GetEmailTemplateRenderErrors200Response.md) +[**GetEmailTemplateRenderErrorsResponse**](GetEmailTemplateRenderErrorsResponse.md) ### Authorization @@ -3903,7 +3907,7 @@ end ## get_email_templates -> get_email_templates(tenant_id, opts) +> get_email_templates(tenant_id, opts) @@ -3939,7 +3943,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_email_templates_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_email_templates_with_http_info(tenant_id, opts) ```ruby begin @@ -3947,7 +3951,7 @@ begin data, status_code, headers = api_instance.get_email_templates_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_email_templates_with_http_info: #{e}" end @@ -3962,7 +3966,7 @@ end ### Return type -[**GetEmailTemplates200Response**](GetEmailTemplates200Response.md) +[**GetEmailTemplatesResponse**](GetEmailTemplatesResponse.md) ### Authorization @@ -3976,7 +3980,7 @@ end ## get_feed_posts -> get_feed_posts(tenant_id, opts) +> get_feed_posts(tenant_id, opts) @@ -4016,7 +4020,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_feed_posts_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_feed_posts_with_http_info(tenant_id, opts) ```ruby begin @@ -4024,7 +4028,7 @@ begin data, status_code, headers = api_instance.get_feed_posts_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_feed_posts_with_http_info: #{e}" end @@ -4041,7 +4045,7 @@ end ### Return type -[**GetFeedPosts200Response**](GetFeedPosts200Response.md) +[**GetFeedPostsResponse**](GetFeedPostsResponse.md) ### Authorization @@ -4055,7 +4059,7 @@ end ## get_hash_tags -> get_hash_tags(tenant_id, opts) +> get_hash_tags(tenant_id, opts) @@ -4091,7 +4095,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_hash_tags_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_hash_tags_with_http_info(tenant_id, opts) ```ruby begin @@ -4099,7 +4103,7 @@ begin data, status_code, headers = api_instance.get_hash_tags_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_hash_tags_with_http_info: #{e}" end @@ -4114,7 +4118,7 @@ end ### Return type -[**GetHashTags200Response**](GetHashTags200Response.md) +[**GetHashTagsResponse**](GetHashTagsResponse.md) ### Authorization @@ -4128,7 +4132,7 @@ end ## get_moderator -> get_moderator(tenant_id, id) +> get_moderator(tenant_id, id) @@ -4162,7 +4166,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_moderator_with_http_info(tenant_id, id) +> , Integer, Hash)> get_moderator_with_http_info(tenant_id, id) ```ruby begin @@ -4170,7 +4174,7 @@ begin data, status_code, headers = api_instance.get_moderator_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_moderator_with_http_info: #{e}" end @@ -4185,7 +4189,7 @@ end ### Return type -[**GetModerator200Response**](GetModerator200Response.md) +[**GetModeratorResponse**](GetModeratorResponse.md) ### Authorization @@ -4199,7 +4203,7 @@ end ## get_moderators -> get_moderators(tenant_id, opts) +> get_moderators(tenant_id, opts) @@ -4235,7 +4239,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_moderators_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_moderators_with_http_info(tenant_id, opts) ```ruby begin @@ -4243,7 +4247,7 @@ begin data, status_code, headers = api_instance.get_moderators_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_moderators_with_http_info: #{e}" end @@ -4258,7 +4262,7 @@ end ### Return type -[**GetModerators200Response**](GetModerators200Response.md) +[**GetModeratorsResponse**](GetModeratorsResponse.md) ### Authorization @@ -4272,7 +4276,7 @@ end ## get_notification_count -> get_notification_count(tenant_id, opts) +> get_notification_count(tenant_id, opts) @@ -4312,7 +4316,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_notification_count_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_notification_count_with_http_info(tenant_id, opts) ```ruby begin @@ -4320,7 +4324,7 @@ begin data, status_code, headers = api_instance.get_notification_count_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_notification_count_with_http_info: #{e}" end @@ -4339,7 +4343,7 @@ end ### Return type -[**GetNotificationCount200Response**](GetNotificationCount200Response.md) +[**GetNotificationCountResponse**](GetNotificationCountResponse.md) ### Authorization @@ -4353,7 +4357,7 @@ end ## get_notifications -> get_notifications(tenant_id, opts) +> get_notifications(tenant_id, opts) @@ -4394,7 +4398,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_notifications_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_notifications_with_http_info(tenant_id, opts) ```ruby begin @@ -4402,7 +4406,7 @@ begin data, status_code, headers = api_instance.get_notifications_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_notifications_with_http_info: #{e}" end @@ -4422,7 +4426,7 @@ end ### Return type -[**GetNotifications200Response**](GetNotifications200Response.md) +[**GetNotificationsResponse**](GetNotificationsResponse.md) ### Authorization @@ -4576,7 +4580,7 @@ end ## get_pending_webhook_event_count -> get_pending_webhook_event_count(tenant_id, opts) +> get_pending_webhook_event_count(tenant_id, opts) @@ -4617,7 +4621,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_pending_webhook_event_count_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_pending_webhook_event_count_with_http_info(tenant_id, opts) ```ruby begin @@ -4625,7 +4629,7 @@ begin data, status_code, headers = api_instance.get_pending_webhook_event_count_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_pending_webhook_event_count_with_http_info: #{e}" end @@ -4645,7 +4649,7 @@ end ### Return type -[**GetPendingWebhookEventCount200Response**](GetPendingWebhookEventCount200Response.md) +[**GetPendingWebhookEventCountResponse**](GetPendingWebhookEventCountResponse.md) ### Authorization @@ -4659,7 +4663,7 @@ end ## get_pending_webhook_events -> get_pending_webhook_events(tenant_id, opts) +> get_pending_webhook_events(tenant_id, opts) @@ -4701,7 +4705,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_pending_webhook_events_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_pending_webhook_events_with_http_info(tenant_id, opts) ```ruby begin @@ -4709,7 +4713,7 @@ begin data, status_code, headers = api_instance.get_pending_webhook_events_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_pending_webhook_events_with_http_info: #{e}" end @@ -4730,7 +4734,7 @@ end ### Return type -[**GetPendingWebhookEvents200Response**](GetPendingWebhookEvents200Response.md) +[**GetPendingWebhookEventsResponse**](GetPendingWebhookEventsResponse.md) ### Authorization @@ -4744,7 +4748,7 @@ end ## get_question_config -> get_question_config(tenant_id, id) +> get_question_config(tenant_id, id) @@ -4778,7 +4782,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_question_config_with_http_info(tenant_id, id) +> , Integer, Hash)> get_question_config_with_http_info(tenant_id, id) ```ruby begin @@ -4786,7 +4790,7 @@ begin data, status_code, headers = api_instance.get_question_config_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_question_config_with_http_info: #{e}" end @@ -4801,7 +4805,7 @@ end ### Return type -[**GetQuestionConfig200Response**](GetQuestionConfig200Response.md) +[**GetQuestionConfigResponse**](GetQuestionConfigResponse.md) ### Authorization @@ -4815,7 +4819,7 @@ end ## get_question_configs -> get_question_configs(tenant_id, opts) +> get_question_configs(tenant_id, opts) @@ -4851,7 +4855,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_question_configs_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_question_configs_with_http_info(tenant_id, opts) ```ruby begin @@ -4859,7 +4863,7 @@ begin data, status_code, headers = api_instance.get_question_configs_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_question_configs_with_http_info: #{e}" end @@ -4874,7 +4878,7 @@ end ### Return type -[**GetQuestionConfigs200Response**](GetQuestionConfigs200Response.md) +[**GetQuestionConfigsResponse**](GetQuestionConfigsResponse.md) ### Authorization @@ -4888,7 +4892,7 @@ end ## get_question_result -> get_question_result(tenant_id, id) +> get_question_result(tenant_id, id) @@ -4922,7 +4926,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_question_result_with_http_info(tenant_id, id) +> , Integer, Hash)> get_question_result_with_http_info(tenant_id, id) ```ruby begin @@ -4930,7 +4934,7 @@ begin data, status_code, headers = api_instance.get_question_result_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_question_result_with_http_info: #{e}" end @@ -4945,7 +4949,7 @@ end ### Return type -[**GetQuestionResult200Response**](GetQuestionResult200Response.md) +[**GetQuestionResultResponse**](GetQuestionResultResponse.md) ### Authorization @@ -4959,7 +4963,7 @@ end ## get_question_results -> get_question_results(tenant_id, opts) +> get_question_results(tenant_id, opts) @@ -5000,7 +5004,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_question_results_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_question_results_with_http_info(tenant_id, opts) ```ruby begin @@ -5008,7 +5012,7 @@ begin data, status_code, headers = api_instance.get_question_results_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_question_results_with_http_info: #{e}" end @@ -5028,7 +5032,7 @@ end ### Return type -[**GetQuestionResults200Response**](GetQuestionResults200Response.md) +[**GetQuestionResultsResponse**](GetQuestionResultsResponse.md) ### Authorization @@ -5184,7 +5188,7 @@ end ## get_sso_users -> get_sso_users(tenant_id, opts) +> get_sso_users(tenant_id, opts) @@ -5220,7 +5224,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_sso_users_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_sso_users_with_http_info(tenant_id, opts) ```ruby begin @@ -5228,7 +5232,7 @@ begin data, status_code, headers = api_instance.get_sso_users_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_sso_users_with_http_info: #{e}" end @@ -5243,7 +5247,7 @@ end ### Return type -[**GetSSOUsers200Response**](GetSSOUsers200Response.md) +[**GetSSOUsersResponse**](GetSSOUsersResponse.md) ### Authorization @@ -5330,7 +5334,7 @@ end ## get_tenant -> get_tenant(tenant_id, id) +> get_tenant(tenant_id, id) @@ -5364,7 +5368,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_tenant_with_http_info(tenant_id, id) +> , Integer, Hash)> get_tenant_with_http_info(tenant_id, id) ```ruby begin @@ -5372,7 +5376,7 @@ begin data, status_code, headers = api_instance.get_tenant_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_tenant_with_http_info: #{e}" end @@ -5387,7 +5391,7 @@ end ### Return type -[**GetTenant200Response**](GetTenant200Response.md) +[**GetTenantResponse**](GetTenantResponse.md) ### Authorization @@ -5401,7 +5405,7 @@ end ## get_tenant_daily_usages -> get_tenant_daily_usages(tenant_id, opts) +> get_tenant_daily_usages(tenant_id, opts) @@ -5440,7 +5444,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_tenant_daily_usages_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_tenant_daily_usages_with_http_info(tenant_id, opts) ```ruby begin @@ -5448,7 +5452,7 @@ begin data, status_code, headers = api_instance.get_tenant_daily_usages_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_tenant_daily_usages_with_http_info: #{e}" end @@ -5466,7 +5470,7 @@ end ### Return type -[**GetTenantDailyUsages200Response**](GetTenantDailyUsages200Response.md) +[**GetTenantDailyUsagesResponse**](GetTenantDailyUsagesResponse.md) ### Authorization @@ -5480,7 +5484,7 @@ end ## get_tenant_package -> get_tenant_package(tenant_id, id) +> get_tenant_package(tenant_id, id) @@ -5514,7 +5518,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_tenant_package_with_http_info(tenant_id, id) +> , Integer, Hash)> get_tenant_package_with_http_info(tenant_id, id) ```ruby begin @@ -5522,7 +5526,7 @@ begin data, status_code, headers = api_instance.get_tenant_package_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_tenant_package_with_http_info: #{e}" end @@ -5537,7 +5541,7 @@ end ### Return type -[**GetTenantPackage200Response**](GetTenantPackage200Response.md) +[**GetTenantPackageResponse**](GetTenantPackageResponse.md) ### Authorization @@ -5551,7 +5555,7 @@ end ## get_tenant_packages -> get_tenant_packages(tenant_id, opts) +> get_tenant_packages(tenant_id, opts) @@ -5587,7 +5591,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_tenant_packages_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_tenant_packages_with_http_info(tenant_id, opts) ```ruby begin @@ -5595,7 +5599,7 @@ begin data, status_code, headers = api_instance.get_tenant_packages_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_tenant_packages_with_http_info: #{e}" end @@ -5610,7 +5614,7 @@ end ### Return type -[**GetTenantPackages200Response**](GetTenantPackages200Response.md) +[**GetTenantPackagesResponse**](GetTenantPackagesResponse.md) ### Authorization @@ -5624,7 +5628,7 @@ end ## get_tenant_user -> get_tenant_user(tenant_id, id) +> get_tenant_user(tenant_id, id) @@ -5658,7 +5662,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_tenant_user_with_http_info(tenant_id, id) +> , Integer, Hash)> get_tenant_user_with_http_info(tenant_id, id) ```ruby begin @@ -5666,7 +5670,7 @@ begin data, status_code, headers = api_instance.get_tenant_user_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_tenant_user_with_http_info: #{e}" end @@ -5681,7 +5685,7 @@ end ### Return type -[**GetTenantUser200Response**](GetTenantUser200Response.md) +[**GetTenantUserResponse**](GetTenantUserResponse.md) ### Authorization @@ -5695,7 +5699,7 @@ end ## get_tenant_users -> get_tenant_users(tenant_id, opts) +> get_tenant_users(tenant_id, opts) @@ -5731,7 +5735,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_tenant_users_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_tenant_users_with_http_info(tenant_id, opts) ```ruby begin @@ -5739,7 +5743,7 @@ begin data, status_code, headers = api_instance.get_tenant_users_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_tenant_users_with_http_info: #{e}" end @@ -5754,7 +5758,7 @@ end ### Return type -[**GetTenantUsers200Response**](GetTenantUsers200Response.md) +[**GetTenantUsersResponse**](GetTenantUsersResponse.md) ### Authorization @@ -5768,7 +5772,7 @@ end ## get_tenants -> get_tenants(tenant_id, opts) +> get_tenants(tenant_id, opts) @@ -5805,7 +5809,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_tenants_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_tenants_with_http_info(tenant_id, opts) ```ruby begin @@ -5813,7 +5817,7 @@ begin data, status_code, headers = api_instance.get_tenants_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_tenants_with_http_info: #{e}" end @@ -5829,7 +5833,7 @@ end ### Return type -[**GetTenants200Response**](GetTenants200Response.md) +[**GetTenantsResponse**](GetTenantsResponse.md) ### Authorization @@ -5843,7 +5847,7 @@ end ## get_ticket -> get_ticket(tenant_id, id, opts) +> get_ticket(tenant_id, id, opts) @@ -5880,7 +5884,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_ticket_with_http_info(tenant_id, id, opts) +> , Integer, Hash)> get_ticket_with_http_info(tenant_id, id, opts) ```ruby begin @@ -5888,7 +5892,7 @@ begin data, status_code, headers = api_instance.get_ticket_with_http_info(tenant_id, id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_ticket_with_http_info: #{e}" end @@ -5904,7 +5908,7 @@ end ### Return type -[**GetTicket200Response**](GetTicket200Response.md) +[**GetTicketResponse**](GetTicketResponse.md) ### Authorization @@ -5918,7 +5922,7 @@ end ## get_tickets -> get_tickets(tenant_id, opts) +> get_tickets(tenant_id, opts) @@ -5957,7 +5961,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_tickets_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_tickets_with_http_info(tenant_id, opts) ```ruby begin @@ -5965,7 +5969,7 @@ begin data, status_code, headers = api_instance.get_tickets_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_tickets_with_http_info: #{e}" end @@ -5983,7 +5987,7 @@ end ### Return type -[**GetTickets200Response**](GetTickets200Response.md) +[**GetTicketsResponse**](GetTicketsResponse.md) ### Authorization @@ -5997,7 +6001,7 @@ end ## get_user -> get_user(tenant_id, id) +> get_user(tenant_id, id) @@ -6031,7 +6035,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_user_with_http_info(tenant_id, id) +> , Integer, Hash)> get_user_with_http_info(tenant_id, id) ```ruby begin @@ -6039,7 +6043,7 @@ begin data, status_code, headers = api_instance.get_user_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_user_with_http_info: #{e}" end @@ -6054,7 +6058,7 @@ end ### Return type -[**GetUser200Response**](GetUser200Response.md) +[**GetUserResponse**](GetUserResponse.md) ### Authorization @@ -6068,7 +6072,7 @@ end ## get_user_badge -> get_user_badge(tenant_id, id) +> get_user_badge(tenant_id, id) @@ -6102,7 +6106,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_user_badge_with_http_info(tenant_id, id) +> , Integer, Hash)> get_user_badge_with_http_info(tenant_id, id) ```ruby begin @@ -6110,7 +6114,7 @@ begin data, status_code, headers = api_instance.get_user_badge_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_user_badge_with_http_info: #{e}" end @@ -6125,7 +6129,7 @@ end ### Return type -[**GetUserBadge200Response**](GetUserBadge200Response.md) +[**APIGetUserBadgeResponse**](APIGetUserBadgeResponse.md) ### Authorization @@ -6139,7 +6143,7 @@ end ## get_user_badge_progress_by_id -> get_user_badge_progress_by_id(tenant_id, id) +> get_user_badge_progress_by_id(tenant_id, id) @@ -6173,7 +6177,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_user_badge_progress_by_id_with_http_info(tenant_id, id) +> , Integer, Hash)> get_user_badge_progress_by_id_with_http_info(tenant_id, id) ```ruby begin @@ -6181,7 +6185,7 @@ begin data, status_code, headers = api_instance.get_user_badge_progress_by_id_with_http_info(tenant_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_user_badge_progress_by_id_with_http_info: #{e}" end @@ -6196,7 +6200,7 @@ end ### Return type -[**GetUserBadgeProgressById200Response**](GetUserBadgeProgressById200Response.md) +[**APIGetUserBadgeProgressResponse**](APIGetUserBadgeProgressResponse.md) ### Authorization @@ -6210,7 +6214,7 @@ end ## get_user_badge_progress_by_user_id -> get_user_badge_progress_by_user_id(tenant_id, user_id) +> get_user_badge_progress_by_user_id(tenant_id, user_id) @@ -6244,7 +6248,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_user_badge_progress_by_user_id_with_http_info(tenant_id, user_id) +> , Integer, Hash)> get_user_badge_progress_by_user_id_with_http_info(tenant_id, user_id) ```ruby begin @@ -6252,7 +6256,7 @@ begin data, status_code, headers = api_instance.get_user_badge_progress_by_user_id_with_http_info(tenant_id, user_id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_user_badge_progress_by_user_id_with_http_info: #{e}" end @@ -6267,7 +6271,7 @@ end ### Return type -[**GetUserBadgeProgressById200Response**](GetUserBadgeProgressById200Response.md) +[**APIGetUserBadgeProgressResponse**](APIGetUserBadgeProgressResponse.md) ### Authorization @@ -6281,7 +6285,7 @@ end ## get_user_badge_progress_list -> get_user_badge_progress_list(tenant_id, opts) +> get_user_badge_progress_list(tenant_id, opts) @@ -6319,7 +6323,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_user_badge_progress_list_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_user_badge_progress_list_with_http_info(tenant_id, opts) ```ruby begin @@ -6327,7 +6331,7 @@ begin data, status_code, headers = api_instance.get_user_badge_progress_list_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_user_badge_progress_list_with_http_info: #{e}" end @@ -6344,7 +6348,7 @@ end ### Return type -[**GetUserBadgeProgressList200Response**](GetUserBadgeProgressList200Response.md) +[**APIGetUserBadgeProgressListResponse**](APIGetUserBadgeProgressListResponse.md) ### Authorization @@ -6358,7 +6362,7 @@ end ## get_user_badges -> get_user_badges(tenant_id, opts) +> get_user_badges(tenant_id, opts) @@ -6399,7 +6403,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_user_badges_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_user_badges_with_http_info(tenant_id, opts) ```ruby begin @@ -6407,7 +6411,7 @@ begin data, status_code, headers = api_instance.get_user_badges_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_user_badges_with_http_info: #{e}" end @@ -6427,7 +6431,7 @@ end ### Return type -[**GetUserBadges200Response**](GetUserBadges200Response.md) +[**APIGetUserBadgesResponse**](APIGetUserBadgesResponse.md) ### Authorization @@ -6441,7 +6445,7 @@ end ## get_votes -> get_votes(tenant_id, url_id) +> get_votes(tenant_id, url_id) @@ -6475,7 +6479,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_votes_with_http_info(tenant_id, url_id) +> , Integer, Hash)> get_votes_with_http_info(tenant_id, url_id) ```ruby begin @@ -6483,7 +6487,7 @@ begin data, status_code, headers = api_instance.get_votes_with_http_info(tenant_id, url_id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_votes_with_http_info: #{e}" end @@ -6498,7 +6502,7 @@ end ### Return type -[**GetVotes200Response**](GetVotes200Response.md) +[**GetVotesResponse**](GetVotesResponse.md) ### Authorization @@ -6512,7 +6516,7 @@ end ## get_votes_for_user -> get_votes_for_user(tenant_id, url_id, opts) +> get_votes_for_user(tenant_id, url_id, opts) @@ -6550,7 +6554,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_votes_for_user_with_http_info(tenant_id, url_id, opts) +> , Integer, Hash)> get_votes_for_user_with_http_info(tenant_id, url_id, opts) ```ruby begin @@ -6558,7 +6562,7 @@ begin data, status_code, headers = api_instance.get_votes_for_user_with_http_info(tenant_id, url_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->get_votes_for_user_with_http_info: #{e}" end @@ -6575,7 +6579,7 @@ end ### Return type -[**GetVotesForUser200Response**](GetVotesForUser200Response.md) +[**GetVotesForUserResponse**](GetVotesForUserResponse.md) ### Authorization @@ -6589,7 +6593,7 @@ end ## patch_domain_config -> patch_domain_config(tenant_id, domain_to_update, patch_domain_config_params) +> patch_domain_config(tenant_id, domain_to_update, patch_domain_config_params) @@ -6624,7 +6628,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> patch_domain_config_with_http_info(tenant_id, domain_to_update, patch_domain_config_params) +> , Integer, Hash)> patch_domain_config_with_http_info(tenant_id, domain_to_update, patch_domain_config_params) ```ruby begin @@ -6632,7 +6636,7 @@ begin data, status_code, headers = api_instance.patch_domain_config_with_http_info(tenant_id, domain_to_update, patch_domain_config_params) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->patch_domain_config_with_http_info: #{e}" end @@ -6648,7 +6652,7 @@ end ### Return type -[**GetDomainConfig200Response**](GetDomainConfig200Response.md) +[**PatchDomainConfigResponse**](PatchDomainConfigResponse.md) ### Authorization @@ -6662,7 +6666,7 @@ end ## patch_hash_tag -> patch_hash_tag(tag, opts) +> patch_hash_tag(tag, opts) @@ -6699,7 +6703,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> patch_hash_tag_with_http_info(tag, opts) +> , Integer, Hash)> patch_hash_tag_with_http_info(tag, opts) ```ruby begin @@ -6707,7 +6711,7 @@ begin data, status_code, headers = api_instance.patch_hash_tag_with_http_info(tag, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->patch_hash_tag_with_http_info: #{e}" end @@ -6723,7 +6727,7 @@ end ### Return type -[**PatchHashTag200Response**](PatchHashTag200Response.md) +[**UpdateHashTagResponse**](UpdateHashTagResponse.md) ### Authorization @@ -6887,7 +6891,7 @@ end ## put_domain_config -> put_domain_config(tenant_id, domain_to_update, update_domain_config_params) +> put_domain_config(tenant_id, domain_to_update, update_domain_config_params) @@ -6922,7 +6926,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> put_domain_config_with_http_info(tenant_id, domain_to_update, update_domain_config_params) +> , Integer, Hash)> put_domain_config_with_http_info(tenant_id, domain_to_update, update_domain_config_params) ```ruby begin @@ -6930,7 +6934,7 @@ begin data, status_code, headers = api_instance.put_domain_config_with_http_info(tenant_id, domain_to_update, update_domain_config_params) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->put_domain_config_with_http_info: #{e}" end @@ -6946,7 +6950,7 @@ end ### Return type -[**GetDomainConfig200Response**](GetDomainConfig200Response.md) +[**PutDomainConfigResponse**](PutDomainConfigResponse.md) ### Authorization @@ -7037,7 +7041,7 @@ end ## render_email_template -> render_email_template(tenant_id, render_email_template_body, opts) +> render_email_template(tenant_id, render_email_template_body, opts) @@ -7074,7 +7078,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> render_email_template_with_http_info(tenant_id, render_email_template_body, opts) +> , Integer, Hash)> render_email_template_with_http_info(tenant_id, render_email_template_body, opts) ```ruby begin @@ -7082,7 +7086,7 @@ begin data, status_code, headers = api_instance.render_email_template_with_http_info(tenant_id, render_email_template_body, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->render_email_template_with_http_info: #{e}" end @@ -7098,7 +7102,7 @@ end ### Return type -[**RenderEmailTemplate200Response**](RenderEmailTemplate200Response.md) +[**RenderEmailTemplateResponse**](RenderEmailTemplateResponse.md) ### Authorization @@ -7112,7 +7116,7 @@ end ## replace_tenant_package -> replace_tenant_package(tenant_id, id, replace_tenant_package_body) +> replace_tenant_package(tenant_id, id, replace_tenant_package_body) @@ -7147,7 +7151,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> replace_tenant_package_with_http_info(tenant_id, id, replace_tenant_package_body) +> , Integer, Hash)> replace_tenant_package_with_http_info(tenant_id, id, replace_tenant_package_body) ```ruby begin @@ -7155,7 +7159,7 @@ begin data, status_code, headers = api_instance.replace_tenant_package_with_http_info(tenant_id, id, replace_tenant_package_body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->replace_tenant_package_with_http_info: #{e}" end @@ -7171,7 +7175,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -7185,7 +7189,7 @@ end ## replace_tenant_user -> replace_tenant_user(tenant_id, id, replace_tenant_user_body, opts) +> replace_tenant_user(tenant_id, id, replace_tenant_user_body, opts) @@ -7223,7 +7227,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> replace_tenant_user_with_http_info(tenant_id, id, replace_tenant_user_body, opts) +> , Integer, Hash)> replace_tenant_user_with_http_info(tenant_id, id, replace_tenant_user_body, opts) ```ruby begin @@ -7231,7 +7235,7 @@ begin data, status_code, headers = api_instance.replace_tenant_user_with_http_info(tenant_id, id, replace_tenant_user_body, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->replace_tenant_user_with_http_info: #{e}" end @@ -7248,7 +7252,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -7262,7 +7266,7 @@ end ## save_comment -> save_comment(tenant_id, create_comment_params, opts) +> save_comment(tenant_id, create_comment_params, opts) @@ -7302,7 +7306,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> save_comment_with_http_info(tenant_id, create_comment_params, opts) +> , Integer, Hash)> save_comment_with_http_info(tenant_id, create_comment_params, opts) ```ruby begin @@ -7310,7 +7314,7 @@ begin data, status_code, headers = api_instance.save_comment_with_http_info(tenant_id, create_comment_params, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->save_comment_with_http_info: #{e}" end @@ -7329,7 +7333,7 @@ end ### Return type -[**SaveComment200Response**](SaveComment200Response.md) +[**APISaveCommentResponse**](APISaveCommentResponse.md) ### Authorization @@ -7343,7 +7347,7 @@ end ## save_comments_bulk -> > save_comments_bulk(tenant_id, create_comment_params, opts) +> > save_comments_bulk(tenant_id, create_comment_params, opts) @@ -7383,7 +7387,7 @@ end This returns an Array which contains the response data, status code and headers. -> >, Integer, Hash)> save_comments_bulk_with_http_info(tenant_id, create_comment_params, opts) +> >, Integer, Hash)> save_comments_bulk_with_http_info(tenant_id, create_comment_params, opts) ```ruby begin @@ -7391,7 +7395,7 @@ begin data, status_code, headers = api_instance.save_comments_bulk_with_http_info(tenant_id, create_comment_params, opts) p status_code # => 2xx p headers # => { ... } - p data # => > + p data # => > rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->save_comments_bulk_with_http_info: #{e}" end @@ -7410,7 +7414,7 @@ end ### Return type -[**Array<SaveComment200Response>**](SaveComment200Response.md) +[**Array<SaveCommentsBulkResponse>**](SaveCommentsBulkResponse.md) ### Authorization @@ -7424,7 +7428,7 @@ end ## send_invite -> send_invite(tenant_id, id, from_name) +> send_invite(tenant_id, id, from_name) @@ -7459,7 +7463,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> send_invite_with_http_info(tenant_id, id, from_name) +> , Integer, Hash)> send_invite_with_http_info(tenant_id, id, from_name) ```ruby begin @@ -7467,7 +7471,7 @@ begin data, status_code, headers = api_instance.send_invite_with_http_info(tenant_id, id, from_name) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->send_invite_with_http_info: #{e}" end @@ -7483,7 +7487,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -7497,7 +7501,7 @@ end ## send_login_link -> send_login_link(tenant_id, id, opts) +> send_login_link(tenant_id, id, opts) @@ -7534,7 +7538,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> send_login_link_with_http_info(tenant_id, id, opts) +> , Integer, Hash)> send_login_link_with_http_info(tenant_id, id, opts) ```ruby begin @@ -7542,7 +7546,7 @@ begin data, status_code, headers = api_instance.send_login_link_with_http_info(tenant_id, id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->send_login_link_with_http_info: #{e}" end @@ -7558,7 +7562,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -7572,7 +7576,7 @@ end ## un_block_user_from_comment -> un_block_user_from_comment(tenant_id, id, un_block_from_comment_params, opts) +> un_block_user_from_comment(tenant_id, id, un_block_from_comment_params, opts) @@ -7611,7 +7615,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> un_block_user_from_comment_with_http_info(tenant_id, id, un_block_from_comment_params, opts) +> , Integer, Hash)> un_block_user_from_comment_with_http_info(tenant_id, id, un_block_from_comment_params, opts) ```ruby begin @@ -7619,7 +7623,7 @@ begin data, status_code, headers = api_instance.un_block_user_from_comment_with_http_info(tenant_id, id, un_block_from_comment_params, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->un_block_user_from_comment_with_http_info: #{e}" end @@ -7637,7 +7641,7 @@ end ### Return type -[**UnBlockCommentPublic200Response**](UnBlockCommentPublic200Response.md) +[**UnblockSuccess**](UnblockSuccess.md) ### Authorization @@ -7651,7 +7655,7 @@ end ## un_flag_comment -> un_flag_comment(tenant_id, id, opts) +> un_flag_comment(tenant_id, id, opts) @@ -7689,7 +7693,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> un_flag_comment_with_http_info(tenant_id, id, opts) +> , Integer, Hash)> un_flag_comment_with_http_info(tenant_id, id, opts) ```ruby begin @@ -7697,7 +7701,7 @@ begin data, status_code, headers = api_instance.un_flag_comment_with_http_info(tenant_id, id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->un_flag_comment_with_http_info: #{e}" end @@ -7714,7 +7718,7 @@ end ### Return type -[**FlagComment200Response**](FlagComment200Response.md) +[**FlagCommentResponse**](FlagCommentResponse.md) ### Authorization @@ -7728,7 +7732,7 @@ end ## update_comment -> update_comment(tenant_id, id, updatable_comment_params, opts) +> update_comment(tenant_id, id, updatable_comment_params, opts) @@ -7768,7 +7772,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_comment_with_http_info(tenant_id, id, updatable_comment_params, opts) +> , Integer, Hash)> update_comment_with_http_info(tenant_id, id, updatable_comment_params, opts) ```ruby begin @@ -7776,7 +7780,7 @@ begin data, status_code, headers = api_instance.update_comment_with_http_info(tenant_id, id, updatable_comment_params, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->update_comment_with_http_info: #{e}" end @@ -7795,7 +7799,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -7809,7 +7813,7 @@ end ## update_email_template -> update_email_template(tenant_id, id, update_email_template_body) +> update_email_template(tenant_id, id, update_email_template_body) @@ -7844,7 +7848,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_email_template_with_http_info(tenant_id, id, update_email_template_body) +> , Integer, Hash)> update_email_template_with_http_info(tenant_id, id, update_email_template_body) ```ruby begin @@ -7852,7 +7856,7 @@ begin data, status_code, headers = api_instance.update_email_template_with_http_info(tenant_id, id, update_email_template_body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->update_email_template_with_http_info: #{e}" end @@ -7868,7 +7872,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -7882,7 +7886,7 @@ end ## update_feed_post -> update_feed_post(tenant_id, id, feed_post) +> update_feed_post(tenant_id, id, feed_post) @@ -7917,7 +7921,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_feed_post_with_http_info(tenant_id, id, feed_post) +> , Integer, Hash)> update_feed_post_with_http_info(tenant_id, id, feed_post) ```ruby begin @@ -7925,7 +7929,7 @@ begin data, status_code, headers = api_instance.update_feed_post_with_http_info(tenant_id, id, feed_post) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->update_feed_post_with_http_info: #{e}" end @@ -7941,7 +7945,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -7955,7 +7959,7 @@ end ## update_moderator -> update_moderator(tenant_id, id, update_moderator_body) +> update_moderator(tenant_id, id, update_moderator_body) @@ -7990,7 +7994,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_moderator_with_http_info(tenant_id, id, update_moderator_body) +> , Integer, Hash)> update_moderator_with_http_info(tenant_id, id, update_moderator_body) ```ruby begin @@ -7998,7 +8002,7 @@ begin data, status_code, headers = api_instance.update_moderator_with_http_info(tenant_id, id, update_moderator_body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->update_moderator_with_http_info: #{e}" end @@ -8014,7 +8018,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -8028,7 +8032,7 @@ end ## update_notification -> update_notification(tenant_id, id, update_notification_body, opts) +> update_notification(tenant_id, id, update_notification_body, opts) @@ -8066,7 +8070,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_notification_with_http_info(tenant_id, id, update_notification_body, opts) +> , Integer, Hash)> update_notification_with_http_info(tenant_id, id, update_notification_body, opts) ```ruby begin @@ -8074,7 +8078,7 @@ begin data, status_code, headers = api_instance.update_notification_with_http_info(tenant_id, id, update_notification_body, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->update_notification_with_http_info: #{e}" end @@ -8091,7 +8095,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -8105,7 +8109,7 @@ end ## update_question_config -> update_question_config(tenant_id, id, update_question_config_body) +> update_question_config(tenant_id, id, update_question_config_body) @@ -8140,7 +8144,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_question_config_with_http_info(tenant_id, id, update_question_config_body) +> , Integer, Hash)> update_question_config_with_http_info(tenant_id, id, update_question_config_body) ```ruby begin @@ -8148,7 +8152,7 @@ begin data, status_code, headers = api_instance.update_question_config_with_http_info(tenant_id, id, update_question_config_body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->update_question_config_with_http_info: #{e}" end @@ -8164,7 +8168,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -8178,7 +8182,7 @@ end ## update_question_result -> update_question_result(tenant_id, id, update_question_result_body) +> update_question_result(tenant_id, id, update_question_result_body) @@ -8213,7 +8217,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_question_result_with_http_info(tenant_id, id, update_question_result_body) +> , Integer, Hash)> update_question_result_with_http_info(tenant_id, id, update_question_result_body) ```ruby begin @@ -8221,7 +8225,7 @@ begin data, status_code, headers = api_instance.update_question_result_with_http_info(tenant_id, id, update_question_result_body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->update_question_result_with_http_info: #{e}" end @@ -8237,7 +8241,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -8328,7 +8332,7 @@ end ## update_tenant -> update_tenant(tenant_id, id, update_tenant_body) +> update_tenant(tenant_id, id, update_tenant_body) @@ -8363,7 +8367,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_tenant_with_http_info(tenant_id, id, update_tenant_body) +> , Integer, Hash)> update_tenant_with_http_info(tenant_id, id, update_tenant_body) ```ruby begin @@ -8371,7 +8375,7 @@ begin data, status_code, headers = api_instance.update_tenant_with_http_info(tenant_id, id, update_tenant_body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->update_tenant_with_http_info: #{e}" end @@ -8387,7 +8391,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -8401,7 +8405,7 @@ end ## update_tenant_package -> update_tenant_package(tenant_id, id, update_tenant_package_body) +> update_tenant_package(tenant_id, id, update_tenant_package_body) @@ -8436,7 +8440,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_tenant_package_with_http_info(tenant_id, id, update_tenant_package_body) +> , Integer, Hash)> update_tenant_package_with_http_info(tenant_id, id, update_tenant_package_body) ```ruby begin @@ -8444,7 +8448,7 @@ begin data, status_code, headers = api_instance.update_tenant_package_with_http_info(tenant_id, id, update_tenant_package_body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->update_tenant_package_with_http_info: #{e}" end @@ -8460,7 +8464,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -8474,7 +8478,7 @@ end ## update_tenant_user -> update_tenant_user(tenant_id, id, update_tenant_user_body, opts) +> update_tenant_user(tenant_id, id, update_tenant_user_body, opts) @@ -8512,7 +8516,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_tenant_user_with_http_info(tenant_id, id, update_tenant_user_body, opts) +> , Integer, Hash)> update_tenant_user_with_http_info(tenant_id, id, update_tenant_user_body, opts) ```ruby begin @@ -8520,7 +8524,7 @@ begin data, status_code, headers = api_instance.update_tenant_user_with_http_info(tenant_id, id, update_tenant_user_body, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->update_tenant_user_with_http_info: #{e}" end @@ -8537,7 +8541,7 @@ end ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -8551,7 +8555,7 @@ end ## update_user_badge -> update_user_badge(tenant_id, id, update_user_badge_params) +> update_user_badge(tenant_id, id, update_user_badge_params) @@ -8586,7 +8590,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_user_badge_with_http_info(tenant_id, id, update_user_badge_params) +> , Integer, Hash)> update_user_badge_with_http_info(tenant_id, id, update_user_badge_params) ```ruby begin @@ -8594,7 +8598,7 @@ begin data, status_code, headers = api_instance.update_user_badge_with_http_info(tenant_id, id, update_user_badge_params) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling DefaultApi->update_user_badge_with_http_info: #{e}" end @@ -8610,7 +8614,7 @@ end ### Return type -[**UpdateUserBadge200Response**](UpdateUserBadge200Response.md) +[**APIEmptySuccessResponse**](APIEmptySuccessResponse.md) ### Authorization diff --git a/client/docs/DeleteComment200Response.md b/client/docs/DeleteComment200Response.md deleted file mode 100644 index f359ae9..0000000 --- a/client/docs/DeleteComment200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::DeleteComment200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **action** | [**DeleteCommentAction**](DeleteCommentAction.md) | | | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::DeleteComment200Response.new( - action: null, - status: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/DeleteCommentPublic200Response.md b/client/docs/DeleteCommentPublic200Response.md deleted file mode 100644 index 4320361..0000000 --- a/client/docs/DeleteCommentPublic200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# FastCommentsClient::DeleteCommentPublic200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **comment** | [**DeletedCommentResultComment**](DeletedCommentResultComment.md) | | [optional] | -| **hard_removed** | **Boolean** | | | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::DeleteCommentPublic200Response.new( - comment: null, - hard_removed: null, - status: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/DeleteCommentVote200Response.md b/client/docs/DeleteCommentVote200Response.md deleted file mode 100644 index e3c4f7e..0000000 --- a/client/docs/DeleteCommentVote200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::DeleteCommentVote200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **was_pending_vote** | **Boolean** | | [optional] | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::DeleteCommentVote200Response.new( - status: null, - was_pending_vote: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/DeleteDomainConfig200Response.md b/client/docs/DeleteDomainConfigResponse.md similarity index 62% rename from client/docs/DeleteDomainConfig200Response.md rename to client/docs/DeleteDomainConfigResponse.md index 5d4aaed..d0cce97 100644 --- a/client/docs/DeleteDomainConfig200Response.md +++ b/client/docs/DeleteDomainConfigResponse.md @@ -1,4 +1,4 @@ -# FastCommentsClient::DeleteDomainConfig200Response +# FastCommentsClient::DeleteDomainConfigResponse ## Properties @@ -11,7 +11,7 @@ ```ruby require 'fastcomments-client' -instance = FastCommentsClient::DeleteDomainConfig200Response.new( +instance = FastCommentsClient::DeleteDomainConfigResponse.new( status: null ) ``` diff --git a/client/docs/DeleteFeedPostPublic200Response.md b/client/docs/DeleteFeedPostPublic200Response.md deleted file mode 100644 index 3388f1a..0000000 --- a/client/docs/DeleteFeedPostPublic200Response.md +++ /dev/null @@ -1,32 +0,0 @@ -# FastCommentsClient::DeleteFeedPostPublic200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::DeleteFeedPostPublic200Response.new( - status: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/DeleteFeedPostPublic200ResponseAnyOf.md b/client/docs/DeleteFeedPostPublicResponse.md similarity index 62% rename from client/docs/DeleteFeedPostPublic200ResponseAnyOf.md rename to client/docs/DeleteFeedPostPublicResponse.md index c9499c6..567c513 100644 --- a/client/docs/DeleteFeedPostPublic200ResponseAnyOf.md +++ b/client/docs/DeleteFeedPostPublicResponse.md @@ -1,4 +1,4 @@ -# FastCommentsClient::DeleteFeedPostPublic200ResponseAnyOf +# FastCommentsClient::DeleteFeedPostPublicResponse ## Properties @@ -11,7 +11,7 @@ ```ruby require 'fastcomments-client' -instance = FastCommentsClient::DeleteFeedPostPublic200ResponseAnyOf.new( +instance = FastCommentsClient::DeleteFeedPostPublicResponse.new( status: null ) ``` diff --git a/client/docs/DeleteHashTagRequest.md b/client/docs/DeleteHashTagRequestBody.md similarity index 66% rename from client/docs/DeleteHashTagRequest.md rename to client/docs/DeleteHashTagRequestBody.md index ce3d723..1912971 100644 --- a/client/docs/DeleteHashTagRequest.md +++ b/client/docs/DeleteHashTagRequestBody.md @@ -1,4 +1,4 @@ -# FastCommentsClient::DeleteHashTagRequest +# FastCommentsClient::DeleteHashTagRequestBody ## Properties @@ -11,7 +11,7 @@ ```ruby require 'fastcomments-client' -instance = FastCommentsClient::DeleteHashTagRequest.new( +instance = FastCommentsClient::DeleteHashTagRequestBody.new( tenant_id: null ) ``` diff --git a/client/docs/FComment.md b/client/docs/FComment.md index 054c0a8..2189403 100644 --- a/client/docs/FComment.md +++ b/client/docs/FComment.md @@ -76,6 +76,7 @@ | **requires_verification** | **Boolean** | | [optional] | | **edit_key** | **String** | | [optional] | | **tos_accepted_at** | **Time** | | [optional] | +| **bot_id** | **String** | | [optional] | ## Example @@ -154,7 +155,8 @@ instance = FastCommentsClient::FComment.new( view_count: null, requires_verification: null, edit_key: null, - tos_accepted_at: null + tos_accepted_at: null, + bot_id: null ) ``` diff --git a/client/docs/FlagComment200Response.md b/client/docs/FlagComment200Response.md deleted file mode 100644 index 00e04b0..0000000 --- a/client/docs/FlagComment200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# FastCommentsClient::FlagComment200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status_code** | **Integer** | | [optional] | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **code** | **String** | | | -| **reason** | **String** | | | -| **was_unapproved** | **Boolean** | | [optional] | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::FlagComment200Response.new( - status_code: null, - status: null, - code: null, - reason: null, - was_unapproved: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/FlagCommentPublic200Response.md b/client/docs/FlagCommentPublic200Response.md deleted file mode 100644 index 1705ed8..0000000 --- a/client/docs/FlagCommentPublic200Response.md +++ /dev/null @@ -1,32 +0,0 @@ -# FastCommentsClient::FlagCommentPublic200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::FlagCommentPublic200Response.new( - status: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetAuditLogs200Response.md b/client/docs/GetAuditLogs200Response.md deleted file mode 100644 index b79196c..0000000 --- a/client/docs/GetAuditLogs200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetAuditLogs200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **audit_logs** | [**Array<APIAuditLog>**](APIAuditLog.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetAuditLogs200Response.new( - status: null, - audit_logs: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetBannedUsersCountResponse.md b/client/docs/GetBannedUsersCountResponse.md new file mode 100644 index 0000000..e4bc327 --- /dev/null +++ b/client/docs/GetBannedUsersCountResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::GetBannedUsersCountResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **total_count** | **Float** | | | +| **status** | **String** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GetBannedUsersCountResponse.new( + total_count: null, + status: null +) +``` + diff --git a/client/docs/GetBannedUsersFromCommentResponse.md b/client/docs/GetBannedUsersFromCommentResponse.md new file mode 100644 index 0000000..425c549 --- /dev/null +++ b/client/docs/GetBannedUsersFromCommentResponse.md @@ -0,0 +1,22 @@ +# FastCommentsClient::GetBannedUsersFromCommentResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **banned_users** | [**Array<APIBannedUserWithMultiMatchInfo>**](APIBannedUserWithMultiMatchInfo.md) | | | +| **code** | **String** | | [optional] | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GetBannedUsersFromCommentResponse.new( + banned_users: null, + code: null, + status: null +) +``` + diff --git a/client/docs/GetCachedNotificationCount200Response.md b/client/docs/GetCachedNotificationCount200Response.md deleted file mode 100644 index fb7cdaf..0000000 --- a/client/docs/GetCachedNotificationCount200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetCachedNotificationCount200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **data** | [**UserNotificationCount**](UserNotificationCount.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetCachedNotificationCount200Response.new( - status: null, - data: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetComment200Response.md b/client/docs/GetComment200Response.md deleted file mode 100644 index b3d7e2a..0000000 --- a/client/docs/GetComment200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetComment200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **comment** | [**APIComment**](APIComment.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetComment200Response.new( - status: null, - comment: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetCommentBanStatusResponse.md b/client/docs/GetCommentBanStatusResponse.md new file mode 100644 index 0000000..558e857 --- /dev/null +++ b/client/docs/GetCommentBanStatusResponse.md @@ -0,0 +1,22 @@ +# FastCommentsClient::GetCommentBanStatusResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | **String** | | | +| **email_domain** | **String** | | | +| **can_ip_ban** | **Boolean** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GetCommentBanStatusResponse.new( + status: null, + email_domain: null, + can_ip_ban: null +) +``` + diff --git a/client/docs/GetCommentText200Response.md b/client/docs/GetCommentText200Response.md deleted file mode 100644 index 281e7a4..0000000 --- a/client/docs/GetCommentText200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# FastCommentsClient::GetCommentText200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **comment_text** | **String** | | | -| **sanitized_comment_text** | **String** | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetCommentText200Response.new( - status: null, - comment_text: null, - sanitized_comment_text: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetCommentTextResponse.md b/client/docs/GetCommentTextResponse.md new file mode 100644 index 0000000..8273f71 --- /dev/null +++ b/client/docs/GetCommentTextResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::GetCommentTextResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment** | **String** | | [optional] | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GetCommentTextResponse.new( + comment: null, + status: null +) +``` + diff --git a/client/docs/GetCommentVoteUserNames200Response.md b/client/docs/GetCommentVoteUserNames200Response.md deleted file mode 100644 index f8a20e0..0000000 --- a/client/docs/GetCommentVoteUserNames200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# FastCommentsClient::GetCommentVoteUserNames200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **vote_user_names** | **Array<String>** | | | -| **has_more** | **Boolean** | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetCommentVoteUserNames200Response.new( - status: null, - vote_user_names: null, - has_more: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetComments200Response.md b/client/docs/GetComments200Response.md deleted file mode 100644 index 719e4ba..0000000 --- a/client/docs/GetComments200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetComments200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **comments** | [**Array<APIComment>**](APIComment.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetComments200Response.new( - status: null, - comments: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetCommentsForUserResponse.md b/client/docs/GetCommentsForUserResponse.md new file mode 100644 index 0000000..b22c04f --- /dev/null +++ b/client/docs/GetCommentsForUserResponse.md @@ -0,0 +1,18 @@ +# FastCommentsClient::GetCommentsForUserResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **moderating_tenant_ids** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GetCommentsForUserResponse.new( + moderating_tenant_ids: null +) +``` + diff --git a/client/docs/GetCommentsPublic200Response.md b/client/docs/GetCommentsPublic200Response.md deleted file mode 100644 index 080db17..0000000 --- a/client/docs/GetCommentsPublic200Response.md +++ /dev/null @@ -1,78 +0,0 @@ -# FastCommentsClient::GetCommentsPublic200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status_code** | **Integer** | | [optional] | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **code** | **String** | | | -| **reason** | **String** | | | -| **translated_warning** | **String** | | [optional] | -| **comments** | [**Array<PublicComment>**](PublicComment.md) | | | -| **user** | [**UserSessionInfo**](UserSessionInfo.md) | | | -| **url_id_clean** | **String** | | [optional] | -| **last_gen_date** | **Integer** | | [optional] | -| **includes_past_pages** | **Boolean** | | [optional] | -| **is_demo** | **Boolean** | | [optional] | -| **comment_count** | **Integer** | | [optional] | -| **is_site_admin** | **Boolean** | | [optional] | -| **has_billing_issue** | **Boolean** | | [optional] | -| **module_data** | **Hash<String, Object>** | Construct a type with a set of properties K of type T | [optional] | -| **page_number** | **Integer** | | | -| **is_white_labeled** | **Boolean** | | [optional] | -| **is_prod** | **Boolean** | | [optional] | -| **is_crawler** | **Boolean** | | [optional] | -| **notification_count** | **Integer** | | [optional] | -| **has_more** | **Boolean** | | [optional] | -| **is_closed** | **Boolean** | | [optional] | -| **presence_poll_state** | **Integer** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | -| **url_id_ws** | **String** | | [optional] | -| **user_id_ws** | **String** | | [optional] | -| **tenant_id_ws** | **String** | | [optional] | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetCommentsPublic200Response.new( - status_code: null, - status: null, - code: null, - reason: null, - translated_warning: null, - comments: null, - user: null, - url_id_clean: null, - last_gen_date: null, - includes_past_pages: null, - is_demo: null, - comment_count: null, - is_site_admin: null, - has_billing_issue: null, - module_data: null, - page_number: null, - is_white_labeled: null, - is_prod: null, - is_crawler: null, - notification_count: null, - has_more: null, - is_closed: null, - presence_poll_state: null, - custom_config: null, - url_id_ws: null, - user_id_ws: null, - tenant_id_ws: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null -) -``` - diff --git a/client/docs/GetDomainConfig200Response.md b/client/docs/GetDomainConfigResponse.md similarity index 76% rename from client/docs/GetDomainConfig200Response.md rename to client/docs/GetDomainConfigResponse.md index 11a8d01..3c3869b 100644 --- a/client/docs/GetDomainConfig200Response.md +++ b/client/docs/GetDomainConfigResponse.md @@ -1,4 +1,4 @@ -# FastCommentsClient::GetDomainConfig200Response +# FastCommentsClient::GetDomainConfigResponse ## Properties @@ -14,7 +14,7 @@ ```ruby require 'fastcomments-client' -instance = FastCommentsClient::GetDomainConfig200Response.new( +instance = FastCommentsClient::GetDomainConfigResponse.new( configuration: null, status: null, reason: null, diff --git a/client/docs/GetDomainConfigs200Response.md b/client/docs/GetDomainConfigsResponse.md similarity index 76% rename from client/docs/GetDomainConfigs200Response.md rename to client/docs/GetDomainConfigsResponse.md index 568f992..a31d299 100644 --- a/client/docs/GetDomainConfigs200Response.md +++ b/client/docs/GetDomainConfigsResponse.md @@ -1,4 +1,4 @@ -# FastCommentsClient::GetDomainConfigs200Response +# FastCommentsClient::GetDomainConfigsResponse ## Properties @@ -14,7 +14,7 @@ ```ruby require 'fastcomments-client' -instance = FastCommentsClient::GetDomainConfigs200Response.new( +instance = FastCommentsClient::GetDomainConfigsResponse.new( configurations: null, status: null, reason: null, diff --git a/client/docs/GetDomainConfigs200ResponseAnyOf.md b/client/docs/GetDomainConfigsResponseAnyOf.md similarity index 68% rename from client/docs/GetDomainConfigs200ResponseAnyOf.md rename to client/docs/GetDomainConfigsResponseAnyOf.md index 62b2056..e847fc8 100644 --- a/client/docs/GetDomainConfigs200ResponseAnyOf.md +++ b/client/docs/GetDomainConfigsResponseAnyOf.md @@ -1,4 +1,4 @@ -# FastCommentsClient::GetDomainConfigs200ResponseAnyOf +# FastCommentsClient::GetDomainConfigsResponseAnyOf ## Properties @@ -12,7 +12,7 @@ ```ruby require 'fastcomments-client' -instance = FastCommentsClient::GetDomainConfigs200ResponseAnyOf.new( +instance = FastCommentsClient::GetDomainConfigsResponseAnyOf.new( configurations: null, status: null ) diff --git a/client/docs/GetDomainConfigs200ResponseAnyOf1.md b/client/docs/GetDomainConfigsResponseAnyOf1.md similarity index 70% rename from client/docs/GetDomainConfigs200ResponseAnyOf1.md rename to client/docs/GetDomainConfigsResponseAnyOf1.md index e36f5e3..0936fb2 100644 --- a/client/docs/GetDomainConfigs200ResponseAnyOf1.md +++ b/client/docs/GetDomainConfigsResponseAnyOf1.md @@ -1,4 +1,4 @@ -# FastCommentsClient::GetDomainConfigs200ResponseAnyOf1 +# FastCommentsClient::GetDomainConfigsResponseAnyOf1 ## Properties @@ -13,7 +13,7 @@ ```ruby require 'fastcomments-client' -instance = FastCommentsClient::GetDomainConfigs200ResponseAnyOf1.new( +instance = FastCommentsClient::GetDomainConfigsResponseAnyOf1.new( reason: null, code: null, status: null diff --git a/client/docs/GetEmailTemplate200Response.md b/client/docs/GetEmailTemplate200Response.md deleted file mode 100644 index 768609f..0000000 --- a/client/docs/GetEmailTemplate200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetEmailTemplate200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **email_template** | [**CustomEmailTemplate**](CustomEmailTemplate.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetEmailTemplate200Response.new( - status: null, - email_template: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetEmailTemplateDefinitions200Response.md b/client/docs/GetEmailTemplateDefinitions200Response.md deleted file mode 100644 index cb2c765..0000000 --- a/client/docs/GetEmailTemplateDefinitions200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetEmailTemplateDefinitions200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **definitions** | [**Array<EmailTemplateDefinition>**](EmailTemplateDefinition.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetEmailTemplateDefinitions200Response.new( - status: null, - definitions: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetEmailTemplateRenderErrors200Response.md b/client/docs/GetEmailTemplateRenderErrors200Response.md deleted file mode 100644 index 1bde760..0000000 --- a/client/docs/GetEmailTemplateRenderErrors200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetEmailTemplateRenderErrors200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **render_errors** | [**Array<EmailTemplateRenderErrorResponse>**](EmailTemplateRenderErrorResponse.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetEmailTemplateRenderErrors200Response.new( - status: null, - render_errors: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetEmailTemplates200Response.md b/client/docs/GetEmailTemplates200Response.md deleted file mode 100644 index 67ae366..0000000 --- a/client/docs/GetEmailTemplates200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetEmailTemplates200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **email_templates** | [**Array<CustomEmailTemplate>**](CustomEmailTemplate.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetEmailTemplates200Response.new( - status: null, - email_templates: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetEventLog200Response.md b/client/docs/GetEventLog200Response.md deleted file mode 100644 index 5457849..0000000 --- a/client/docs/GetEventLog200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetEventLog200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **events** | [**Array<EventLogEntry>**](EventLogEntry.md) | | | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetEventLog200Response.new( - events: null, - status: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetFeedPosts200Response.md b/client/docs/GetFeedPosts200Response.md deleted file mode 100644 index 01cf862..0000000 --- a/client/docs/GetFeedPosts200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetFeedPosts200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **feed_posts** | [**Array<FeedPost>**](FeedPost.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetFeedPosts200Response.new( - status: null, - feed_posts: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetFeedPostsPublic200Response.md b/client/docs/GetFeedPostsPublic200Response.md deleted file mode 100644 index 994a95d..0000000 --- a/client/docs/GetFeedPostsPublic200Response.md +++ /dev/null @@ -1,44 +0,0 @@ -# FastCommentsClient::GetFeedPostsPublic200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **my_reacts** | **Hash<String, Hash<String, Boolean>>** | | [optional] | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **feed_posts** | [**Array<FeedPost>**](FeedPost.md) | | | -| **user** | [**UserSessionInfo**](UserSessionInfo.md) | | [optional] | -| **url_id_ws** | **String** | | [optional] | -| **user_id_ws** | **String** | | [optional] | -| **tenant_id_ws** | **String** | | [optional] | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetFeedPostsPublic200Response.new( - my_reacts: null, - status: null, - feed_posts: null, - user: null, - url_id_ws: null, - user_id_ws: null, - tenant_id_ws: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetFeedPostsStats200Response.md b/client/docs/GetFeedPostsStats200Response.md deleted file mode 100644 index debe97b..0000000 --- a/client/docs/GetFeedPostsStats200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetFeedPostsStats200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **stats** | [**Hash<String, FeedPostStats>**](FeedPostStats.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetFeedPostsStats200Response.new( - status: null, - stats: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetGifsSearchResponse.md b/client/docs/GetGifsSearchResponse.md new file mode 100644 index 0000000..8e22fde --- /dev/null +++ b/client/docs/GetGifsSearchResponse.md @@ -0,0 +1,22 @@ +# FastCommentsClient::GetGifsSearchResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **images** | **Array<Array<GifSearchResponseImagesInnerInner>>** | | | +| **status** | [**APIStatus**](APIStatus.md) | | | +| **code** | **String** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GetGifsSearchResponse.new( + images: null, + status: null, + code: null +) +``` + diff --git a/client/docs/GetGifsTrendingResponse.md b/client/docs/GetGifsTrendingResponse.md new file mode 100644 index 0000000..59081c8 --- /dev/null +++ b/client/docs/GetGifsTrendingResponse.md @@ -0,0 +1,22 @@ +# FastCommentsClient::GetGifsTrendingResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **images** | **Array<Array<GifSearchResponseImagesInnerInner>>** | | | +| **status** | [**APIStatus**](APIStatus.md) | | | +| **code** | **String** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GetGifsTrendingResponse.new( + images: null, + status: null, + code: null +) +``` + diff --git a/client/docs/GetHashTags200Response.md b/client/docs/GetHashTags200Response.md deleted file mode 100644 index eb5c201..0000000 --- a/client/docs/GetHashTags200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetHashTags200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **hash_tags** | [**Array<TenantHashTag>**](TenantHashTag.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetHashTags200Response.new( - status: null, - hash_tags: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetModerator200Response.md b/client/docs/GetModerator200Response.md deleted file mode 100644 index 42c9e49..0000000 --- a/client/docs/GetModerator200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetModerator200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **moderator** | [**Moderator**](Moderator.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetModerator200Response.new( - status: null, - moderator: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetModerators200Response.md b/client/docs/GetModerators200Response.md deleted file mode 100644 index 8197b16..0000000 --- a/client/docs/GetModerators200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetModerators200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **moderators** | [**Array<Moderator>**](Moderator.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetModerators200Response.new( - status: null, - moderators: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetNotificationCount200Response.md b/client/docs/GetNotificationCount200Response.md deleted file mode 100644 index 47bef8e..0000000 --- a/client/docs/GetNotificationCount200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetNotificationCount200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **count** | **Float** | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetNotificationCount200Response.new( - status: null, - count: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetNotifications200Response.md b/client/docs/GetNotifications200Response.md deleted file mode 100644 index 2666833..0000000 --- a/client/docs/GetNotifications200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetNotifications200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **notifications** | [**Array<UserNotification>**](UserNotification.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetNotifications200Response.new( - status: null, - notifications: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetPendingWebhookEventCount200Response.md b/client/docs/GetPendingWebhookEventCount200Response.md deleted file mode 100644 index 93ed11b..0000000 --- a/client/docs/GetPendingWebhookEventCount200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetPendingWebhookEventCount200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **count** | **Float** | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetPendingWebhookEventCount200Response.new( - status: null, - count: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetPendingWebhookEvents200Response.md b/client/docs/GetPendingWebhookEvents200Response.md deleted file mode 100644 index e989233..0000000 --- a/client/docs/GetPendingWebhookEvents200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetPendingWebhookEvents200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **pending_webhook_events** | [**Array<PendingCommentToSyncOutbound>**](PendingCommentToSyncOutbound.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetPendingWebhookEvents200Response.new( - status: null, - pending_webhook_events: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetPublicPagesResponse.md b/client/docs/GetPublicPagesResponse.md new file mode 100644 index 0000000..c7ca8c6 --- /dev/null +++ b/client/docs/GetPublicPagesResponse.md @@ -0,0 +1,22 @@ +# FastCommentsClient::GetPublicPagesResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **next_cursor** | **String** | | | +| **pages** | [**Array<PublicPage>**](PublicPage.md) | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GetPublicPagesResponse.new( + next_cursor: null, + pages: null, + status: null +) +``` + diff --git a/client/docs/GetQuestionConfig200Response.md b/client/docs/GetQuestionConfig200Response.md deleted file mode 100644 index b480245..0000000 --- a/client/docs/GetQuestionConfig200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetQuestionConfig200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **question_config** | [**QuestionConfig**](QuestionConfig.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetQuestionConfig200Response.new( - status: null, - question_config: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetQuestionConfigs200Response.md b/client/docs/GetQuestionConfigs200Response.md deleted file mode 100644 index 12911fb..0000000 --- a/client/docs/GetQuestionConfigs200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetQuestionConfigs200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **question_configs** | [**Array<QuestionConfig>**](QuestionConfig.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetQuestionConfigs200Response.new( - status: null, - question_configs: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetQuestionResult200Response.md b/client/docs/GetQuestionResult200Response.md deleted file mode 100644 index 136d7b2..0000000 --- a/client/docs/GetQuestionResult200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetQuestionResult200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **question_result** | [**QuestionResult**](QuestionResult.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetQuestionResult200Response.new( - status: null, - question_result: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetQuestionResults200Response.md b/client/docs/GetQuestionResults200Response.md deleted file mode 100644 index c9ccbe5..0000000 --- a/client/docs/GetQuestionResults200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetQuestionResults200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **question_results** | [**Array<QuestionResult>**](QuestionResult.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetQuestionResults200Response.new( - status: null, - question_results: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetSSOUsers200Response.md b/client/docs/GetSSOUsersResponse.md similarity index 73% rename from client/docs/GetSSOUsers200Response.md rename to client/docs/GetSSOUsersResponse.md index 7a06ddb..4c0bf26 100644 --- a/client/docs/GetSSOUsers200Response.md +++ b/client/docs/GetSSOUsersResponse.md @@ -1,4 +1,4 @@ -# FastCommentsClient::GetSSOUsers200Response +# FastCommentsClient::GetSSOUsersResponse ## Properties @@ -12,7 +12,7 @@ ```ruby require 'fastcomments-client' -instance = FastCommentsClient::GetSSOUsers200Response.new( +instance = FastCommentsClient::GetSSOUsersResponse.new( users: null, status: null ) diff --git a/client/docs/GetTenant200Response.md b/client/docs/GetTenant200Response.md deleted file mode 100644 index 54b52b6..0000000 --- a/client/docs/GetTenant200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetTenant200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **tenant** | [**APITenant**](APITenant.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetTenant200Response.new( - status: null, - tenant: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetTenantDailyUsages200Response.md b/client/docs/GetTenantDailyUsages200Response.md deleted file mode 100644 index db19223..0000000 --- a/client/docs/GetTenantDailyUsages200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetTenantDailyUsages200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **tenant_daily_usages** | [**Array<APITenantDailyUsage>**](APITenantDailyUsage.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetTenantDailyUsages200Response.new( - status: null, - tenant_daily_usages: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetTenantManualBadgesResponse.md b/client/docs/GetTenantManualBadgesResponse.md new file mode 100644 index 0000000..7a3fb47 --- /dev/null +++ b/client/docs/GetTenantManualBadgesResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::GetTenantManualBadgesResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **badges** | [**Array<TenantBadge>**](TenantBadge.md) | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GetTenantManualBadgesResponse.new( + badges: null, + status: null +) +``` + diff --git a/client/docs/GetTenantPackage200Response.md b/client/docs/GetTenantPackage200Response.md deleted file mode 100644 index 3bf5892..0000000 --- a/client/docs/GetTenantPackage200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetTenantPackage200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **tenant_package** | [**TenantPackage**](TenantPackage.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetTenantPackage200Response.new( - status: null, - tenant_package: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetTenantPackages200Response.md b/client/docs/GetTenantPackages200Response.md deleted file mode 100644 index cc7baf5..0000000 --- a/client/docs/GetTenantPackages200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetTenantPackages200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **tenant_packages** | [**Array<TenantPackage>**](TenantPackage.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetTenantPackages200Response.new( - status: null, - tenant_packages: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetTenantUser200Response.md b/client/docs/GetTenantUser200Response.md deleted file mode 100644 index 5c0dc63..0000000 --- a/client/docs/GetTenantUser200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetTenantUser200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **tenant_user** | [**User**](User.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetTenantUser200Response.new( - status: null, - tenant_user: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetTenantUsers200Response.md b/client/docs/GetTenantUsers200Response.md deleted file mode 100644 index 65ecf2c..0000000 --- a/client/docs/GetTenantUsers200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetTenantUsers200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **tenant_users** | [**Array<User>**](User.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetTenantUsers200Response.new( - status: null, - tenant_users: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetTenants200Response.md b/client/docs/GetTenants200Response.md deleted file mode 100644 index 7737858..0000000 --- a/client/docs/GetTenants200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetTenants200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **tenants** | [**Array<APITenant>**](APITenant.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetTenants200Response.new( - status: null, - tenants: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetTicket200Response.md b/client/docs/GetTicket200Response.md deleted file mode 100644 index fba7714..0000000 --- a/client/docs/GetTicket200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# FastCommentsClient::GetTicket200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **ticket** | [**APITicketDetail**](APITicketDetail.md) | | | -| **available_states** | **Array<Float>** | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetTicket200Response.new( - status: null, - ticket: null, - available_states: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetTickets200Response.md b/client/docs/GetTickets200Response.md deleted file mode 100644 index d9bc48e..0000000 --- a/client/docs/GetTickets200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetTickets200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **tickets** | [**Array<APITicket>**](APITicket.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetTickets200Response.new( - status: null, - tickets: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetTranslationsResponse.md b/client/docs/GetTranslationsResponse.md new file mode 100644 index 0000000..e3b3839 --- /dev/null +++ b/client/docs/GetTranslationsResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::GetTranslationsResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **translations** | **Hash<String, String>** | Construct a type with a set of properties K of type T | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GetTranslationsResponse.new( + translations: null, + status: null +) +``` + diff --git a/client/docs/GetUser200Response.md b/client/docs/GetUser200Response.md deleted file mode 100644 index 7e1867e..0000000 --- a/client/docs/GetUser200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetUser200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **user** | [**User**](User.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetUser200Response.new( - status: null, - user: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetUserBadge200Response.md b/client/docs/GetUserBadge200Response.md deleted file mode 100644 index 4fbe786..0000000 --- a/client/docs/GetUserBadge200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetUserBadge200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **user_badge** | [**UserBadge**](UserBadge.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetUserBadge200Response.new( - status: null, - user_badge: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetUserBadgeProgressById200Response.md b/client/docs/GetUserBadgeProgressById200Response.md deleted file mode 100644 index 2bc31d0..0000000 --- a/client/docs/GetUserBadgeProgressById200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetUserBadgeProgressById200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **user_badge_progress** | [**UserBadgeProgress**](UserBadgeProgress.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetUserBadgeProgressById200Response.new( - status: null, - user_badge_progress: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetUserBadgeProgressList200Response.md b/client/docs/GetUserBadgeProgressList200Response.md deleted file mode 100644 index 51131a5..0000000 --- a/client/docs/GetUserBadgeProgressList200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetUserBadgeProgressList200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **user_badge_progresses** | [**Array<UserBadgeProgress>**](UserBadgeProgress.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetUserBadgeProgressList200Response.new( - status: null, - user_badge_progresses: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetUserBadges200Response.md b/client/docs/GetUserBadges200Response.md deleted file mode 100644 index 01118da..0000000 --- a/client/docs/GetUserBadges200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetUserBadges200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **user_badges** | [**Array<UserBadge>**](UserBadge.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetUserBadges200Response.new( - status: null, - user_badges: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetUserInternalProfileResponse.md b/client/docs/GetUserInternalProfileResponse.md new file mode 100644 index 0000000..08ae067 --- /dev/null +++ b/client/docs/GetUserInternalProfileResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::GetUserInternalProfileResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **profile** | [**GetUserInternalProfileResponseProfile**](GetUserInternalProfileResponseProfile.md) | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GetUserInternalProfileResponse.new( + profile: null, + status: null +) +``` + diff --git a/client/docs/GetUserInternalProfileResponseProfile.md b/client/docs/GetUserInternalProfileResponseProfile.md new file mode 100644 index 0000000..e557c51 --- /dev/null +++ b/client/docs/GetUserInternalProfileResponseProfile.md @@ -0,0 +1,50 @@ +# FastCommentsClient::GetUserInternalProfileResponseProfile + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **commenter_name** | **String** | | [optional] | +| **first_comment_date** | **Time** | | [optional] | +| **ip_hash** | **String** | | [optional] | +| **country_flag** | **String** | | [optional] | +| **country_code** | **String** | | [optional] | +| **website_url** | **String** | | [optional] | +| **bio** | **String** | | [optional] | +| **karma** | **Float** | | [optional] | +| **locale** | **String** | | [optional] | +| **verified** | **Boolean** | | [optional] | +| **avatar_src** | **String** | | [optional] | +| **display_name** | **String** | | [optional] | +| **username** | **String** | | [optional] | +| **commenter_email** | **String** | | [optional] | +| **email** | **String** | | [optional] | +| **anon_user_id** | **String** | | [optional] | +| **user_id** | **String** | | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GetUserInternalProfileResponseProfile.new( + commenter_name: null, + first_comment_date: null, + ip_hash: null, + country_flag: null, + country_code: null, + website_url: null, + bio: null, + karma: null, + locale: null, + verified: null, + avatar_src: null, + display_name: null, + username: null, + commenter_email: null, + email: null, + anon_user_id: null, + user_id: null +) +``` + diff --git a/client/docs/GetUserManualBadgesResponse.md b/client/docs/GetUserManualBadgesResponse.md new file mode 100644 index 0000000..51cc2ff --- /dev/null +++ b/client/docs/GetUserManualBadgesResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::GetUserManualBadgesResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **badges** | [**Array<UserBadge>**](UserBadge.md) | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GetUserManualBadgesResponse.new( + badges: null, + status: null +) +``` + diff --git a/client/docs/GetUserNotificationCount200Response.md b/client/docs/GetUserNotificationCount200Response.md deleted file mode 100644 index 15a8039..0000000 --- a/client/docs/GetUserNotificationCount200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetUserNotificationCount200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **count** | **Integer** | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetUserNotificationCount200Response.new( - status: null, - count: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetUserNotifications200Response.md b/client/docs/GetUserNotifications200Response.md deleted file mode 100644 index 44c5c0b..0000000 --- a/client/docs/GetUserNotifications200Response.md +++ /dev/null @@ -1,40 +0,0 @@ -# FastCommentsClient::GetUserNotifications200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **translations** | **Hash<String, String>** | Construct a type with a set of properties K of type T | [optional] | -| **is_subscribed** | **Boolean** | | | -| **has_more** | **Boolean** | | | -| **notifications** | [**Array<RenderableUserNotification>**](RenderableUserNotification.md) | | | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetUserNotifications200Response.new( - translations: null, - is_subscribed: null, - has_more: null, - notifications: null, - status: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetUserPresenceStatuses200Response.md b/client/docs/GetUserPresenceStatuses200Response.md deleted file mode 100644 index c01949d..0000000 --- a/client/docs/GetUserPresenceStatuses200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetUserPresenceStatuses200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **user_ids_online** | **Hash<String, Boolean>** | Construct a type with a set of properties K of type T | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetUserPresenceStatuses200Response.new( - status: null, - user_ids_online: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetUserReactsPublic200Response.md b/client/docs/GetUserReactsPublic200Response.md deleted file mode 100644 index 986dbcd..0000000 --- a/client/docs/GetUserReactsPublic200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::GetUserReactsPublic200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **reacts** | **Hash<String, Hash<String, Boolean>>** | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetUserReactsPublic200Response.new( - status: null, - reacts: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetUserTrustFactorResponse.md b/client/docs/GetUserTrustFactorResponse.md new file mode 100644 index 0000000..393f436 --- /dev/null +++ b/client/docs/GetUserTrustFactorResponse.md @@ -0,0 +1,22 @@ +# FastCommentsClient::GetUserTrustFactorResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **manual_trust_factor** | **Float** | | [optional] | +| **auto_trust_factor** | **Float** | | [optional] | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GetUserTrustFactorResponse.new( + manual_trust_factor: null, + auto_trust_factor: null, + status: null +) +``` + diff --git a/client/docs/GetV1PageLikes.md b/client/docs/GetV1PageLikes.md new file mode 100644 index 0000000..f10d816 --- /dev/null +++ b/client/docs/GetV1PageLikes.md @@ -0,0 +1,26 @@ +# FastCommentsClient::GetV1PageLikes + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **url_id_ws** | **String** | | | +| **did_like** | **Boolean** | | | +| **comment_count** | **Integer** | | | +| **like_count** | **Integer** | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GetV1PageLikes.new( + url_id_ws: null, + did_like: null, + comment_count: null, + like_count: null, + status: null +) +``` + diff --git a/client/docs/GetV2PageReactUsersResponse.md b/client/docs/GetV2PageReactUsersResponse.md new file mode 100644 index 0000000..6694815 --- /dev/null +++ b/client/docs/GetV2PageReactUsersResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::GetV2PageReactUsersResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_names** | **Array<String>** | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GetV2PageReactUsersResponse.new( + user_names: null, + status: null +) +``` + diff --git a/client/docs/GetV2PageReacts.md b/client/docs/GetV2PageReacts.md new file mode 100644 index 0000000..eadd164 --- /dev/null +++ b/client/docs/GetV2PageReacts.md @@ -0,0 +1,22 @@ +# FastCommentsClient::GetV2PageReacts + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **reacted_ids** | **Array<String>** | | [optional] | +| **counts** | **Hash<String, Float>** | Construct a type with a set of properties K of type T | [optional] | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GetV2PageReacts.new( + reacted_ids: null, + counts: null, + status: null +) +``` + diff --git a/client/docs/GetVotes200Response.md b/client/docs/GetVotes200Response.md deleted file mode 100644 index ec3d5c1..0000000 --- a/client/docs/GetVotes200Response.md +++ /dev/null @@ -1,38 +0,0 @@ -# FastCommentsClient::GetVotes200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **applied_authorized_votes** | [**Array<PublicVote>**](PublicVote.md) | | | -| **applied_anonymous_votes** | [**Array<PublicVote>**](PublicVote.md) | | | -| **pending_votes** | [**Array<PublicVote>**](PublicVote.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetVotes200Response.new( - status: null, - applied_authorized_votes: null, - applied_anonymous_votes: null, - pending_votes: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GetVotesForUser200Response.md b/client/docs/GetVotesForUser200Response.md deleted file mode 100644 index 23bc2ed..0000000 --- a/client/docs/GetVotesForUser200Response.md +++ /dev/null @@ -1,38 +0,0 @@ -# FastCommentsClient::GetVotesForUser200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **applied_authorized_votes** | [**Array<PublicVote>**](PublicVote.md) | | | -| **applied_anonymous_votes** | [**Array<PublicVote>**](PublicVote.md) | | | -| **pending_votes** | [**Array<PublicVote>**](PublicVote.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::GetVotesForUser200Response.new( - status: null, - applied_authorized_votes: null, - applied_anonymous_votes: null, - pending_votes: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/GifGetLargeResponse.md b/client/docs/GifGetLargeResponse.md new file mode 100644 index 0000000..edc1787 --- /dev/null +++ b/client/docs/GifGetLargeResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::GifGetLargeResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **src** | **String** | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GifGetLargeResponse.new( + src: null, + status: null +) +``` + diff --git a/client/docs/GifSearchInternalError.md b/client/docs/GifSearchInternalError.md new file mode 100644 index 0000000..5b12555 --- /dev/null +++ b/client/docs/GifSearchInternalError.md @@ -0,0 +1,20 @@ +# FastCommentsClient::GifSearchInternalError + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **code** | **String** | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GifSearchInternalError.new( + code: null, + status: null +) +``` + diff --git a/client/docs/GifSearchResponse.md b/client/docs/GifSearchResponse.md new file mode 100644 index 0000000..850451c --- /dev/null +++ b/client/docs/GifSearchResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::GifSearchResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **images** | **Array<Array<GifSearchResponseImagesInnerInner>>** | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GifSearchResponse.new( + images: null, + status: null +) +``` + diff --git a/client/docs/GifSearchResponseImagesInnerInner.md b/client/docs/GifSearchResponseImagesInnerInner.md new file mode 100644 index 0000000..aec99e5 --- /dev/null +++ b/client/docs/GifSearchResponseImagesInnerInner.md @@ -0,0 +1,15 @@ +# FastCommentsClient::GifSearchResponseImagesInnerInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::GifSearchResponseImagesInnerInner.new() +``` + diff --git a/client/docs/HeaderAccountNotification.md b/client/docs/HeaderAccountNotification.md index 0aaea33..59b99e5 100644 --- a/client/docs/HeaderAccountNotification.md +++ b/client/docs/HeaderAccountNotification.md @@ -13,6 +13,7 @@ | **link_url** | **String** | | | | **link_text** | **String** | | | | **created_at** | **Time** | | | +| **type** | **String** | Discriminator for notifications with a special layout/click handler (e.g. \"feedback-offer\"). | [optional] | ## Example @@ -28,7 +29,8 @@ instance = FastCommentsClient::HeaderAccountNotification.new( severity: null, link_url: null, link_text: null, - created_at: null + created_at: null, + type: null ) ``` diff --git a/client/docs/ImportedAgentApprovalNotificationFrequency.md b/client/docs/ImportedAgentApprovalNotificationFrequency.md new file mode 100644 index 0000000..3b66957 --- /dev/null +++ b/client/docs/ImportedAgentApprovalNotificationFrequency.md @@ -0,0 +1,15 @@ +# FastCommentsClient::ImportedAgentApprovalNotificationFrequency + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ImportedAgentApprovalNotificationFrequency.new() +``` + diff --git a/client/docs/LiveEvent.md b/client/docs/LiveEvent.md index 28f838d..bbcb6ce 100644 --- a/client/docs/LiveEvent.md +++ b/client/docs/LiveEvent.md @@ -19,6 +19,7 @@ | **is_closed** | **Boolean** | | [optional] | | **uj** | **Array<String>** | | [optional] | | **ul** | **Array<String>** | | [optional] | +| **sc** | **Integer** | | [optional] | | **changes** | **Hash<String, Integer>** | | [optional] | ## Example @@ -42,6 +43,7 @@ instance = FastCommentsClient::LiveEvent.new( is_closed: null, uj: null, ul: null, + sc: null, changes: null ) ``` diff --git a/client/docs/LockComment200Response.md b/client/docs/LockComment200Response.md deleted file mode 100644 index f699bcc..0000000 --- a/client/docs/LockComment200Response.md +++ /dev/null @@ -1,32 +0,0 @@ -# FastCommentsClient::LockComment200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::LockComment200Response.new( - status: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/ModerationAPIChildCommentsResponse.md b/client/docs/ModerationAPIChildCommentsResponse.md new file mode 100644 index 0000000..5e2b1d7 --- /dev/null +++ b/client/docs/ModerationAPIChildCommentsResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::ModerationAPIChildCommentsResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comments** | [**Array<ModerationAPIComment>**](ModerationAPIComment.md) | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationAPIChildCommentsResponse.new( + comments: null, + status: null +) +``` + diff --git a/client/docs/ModerationAPIComment.md b/client/docs/ModerationAPIComment.md new file mode 100644 index 0000000..f46e614 --- /dev/null +++ b/client/docs/ModerationAPIComment.md @@ -0,0 +1,100 @@ +# FastCommentsClient::ModerationAPIComment + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **is_local_deleted** | **Boolean** | | [optional] | +| **reply_count** | **Float** | | [optional] | +| **feedback_results** | **Array<String>** | | [optional] | +| **is_voted_up** | **Boolean** | | [optional] | +| **is_voted_down** | **Boolean** | | [optional] | +| **my_vote_id** | **String** | | [optional] | +| **_id** | **String** | | | +| **tenant_id** | **String** | | | +| **url_id** | **String** | | | +| **url** | **String** | | | +| **page_title** | **String** | | [optional] | +| **user_id** | **String** | | [optional] | +| **anon_user_id** | **String** | | [optional] | +| **commenter_name** | **String** | | | +| **commenter_link** | **String** | | [optional] | +| **comment_html** | **String** | | | +| **parent_id** | **String** | | [optional] | +| **date** | **Time** | | | +| **local_date_string** | **String** | | [optional] | +| **votes** | **Float** | | [optional] | +| **votes_up** | **Float** | | [optional] | +| **votes_down** | **Float** | | [optional] | +| **expire_at** | **Time** | | [optional] | +| **reviewed** | **Boolean** | | [optional] | +| **avatar_src** | **String** | | [optional] | +| **is_spam** | **Boolean** | | [optional] | +| **perm_not_spam** | **Boolean** | | [optional] | +| **has_links** | **Boolean** | | [optional] | +| **has_code** | **Boolean** | | [optional] | +| **approved** | **Boolean** | | | +| **locale** | **String** | | | +| **is_banned_user** | **Boolean** | | [optional] | +| **is_by_admin** | **Boolean** | | [optional] | +| **is_by_moderator** | **Boolean** | | [optional] | +| **is_pinned** | **Boolean** | | [optional] | +| **is_locked** | **Boolean** | | [optional] | +| **flag_count** | **Float** | | [optional] | +| **display_label** | **String** | | [optional] | +| **badges** | [**Array<CommentUserBadgeInfo>**](CommentUserBadgeInfo.md) | | [optional] | +| **verified** | **Boolean** | | | +| **feedback_ids** | **Array<String>** | | [optional] | +| **is_deleted** | **Boolean** | | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationAPIComment.new( + is_local_deleted: null, + reply_count: null, + feedback_results: null, + is_voted_up: null, + is_voted_down: null, + my_vote_id: null, + _id: null, + tenant_id: null, + url_id: null, + url: null, + page_title: null, + user_id: null, + anon_user_id: null, + commenter_name: null, + commenter_link: null, + comment_html: null, + parent_id: null, + date: null, + local_date_string: null, + votes: null, + votes_up: null, + votes_down: null, + expire_at: null, + reviewed: null, + avatar_src: null, + is_spam: null, + perm_not_spam: null, + has_links: null, + has_code: null, + approved: null, + locale: null, + is_banned_user: null, + is_by_admin: null, + is_by_moderator: null, + is_pinned: null, + is_locked: null, + flag_count: null, + display_label: null, + badges: null, + verified: null, + feedback_ids: null, + is_deleted: null +) +``` + diff --git a/client/docs/ModerationAPICommentLog.md b/client/docs/ModerationAPICommentLog.md new file mode 100644 index 0000000..3e761b5 --- /dev/null +++ b/client/docs/ModerationAPICommentLog.md @@ -0,0 +1,24 @@ +# FastCommentsClient::ModerationAPICommentLog + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **date** | **Time** | | | +| **username** | **String** | | [optional] | +| **action_name** | **String** | | | +| **message_html** | **String** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationAPICommentLog.new( + date: null, + username: null, + action_name: null, + message_html: null +) +``` + diff --git a/client/docs/ModerationAPICommentResponse.md b/client/docs/ModerationAPICommentResponse.md new file mode 100644 index 0000000..ff7ef23 --- /dev/null +++ b/client/docs/ModerationAPICommentResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::ModerationAPICommentResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment** | [**ModerationAPIComment**](ModerationAPIComment.md) | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationAPICommentResponse.new( + comment: null, + status: null +) +``` + diff --git a/client/docs/ModerationAPICountCommentsResponse.md b/client/docs/ModerationAPICountCommentsResponse.md new file mode 100644 index 0000000..57b8d38 --- /dev/null +++ b/client/docs/ModerationAPICountCommentsResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::ModerationAPICountCommentsResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | [**APIStatus**](APIStatus.md) | | | +| **count** | **Float** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationAPICountCommentsResponse.new( + status: null, + count: null +) +``` + diff --git a/client/docs/ModerationAPIGetCommentIdsResponse.md b/client/docs/ModerationAPIGetCommentIdsResponse.md new file mode 100644 index 0000000..a54d4d9 --- /dev/null +++ b/client/docs/ModerationAPIGetCommentIdsResponse.md @@ -0,0 +1,22 @@ +# FastCommentsClient::ModerationAPIGetCommentIdsResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | **Array<String>** | | | +| **has_more** | **Boolean** | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationAPIGetCommentIdsResponse.new( + ids: null, + has_more: null, + status: null +) +``` + diff --git a/client/docs/ModerationAPIGetCommentsResponse.md b/client/docs/ModerationAPIGetCommentsResponse.md new file mode 100644 index 0000000..2f00f2d --- /dev/null +++ b/client/docs/ModerationAPIGetCommentsResponse.md @@ -0,0 +1,24 @@ +# FastCommentsClient::ModerationAPIGetCommentsResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | [**APIStatus**](APIStatus.md) | | | +| **translations** | **Object** | | | +| **comments** | [**Array<ModerationAPIComment>**](ModerationAPIComment.md) | | | +| **moderation_filter** | [**ModerationFilter**](ModerationFilter.md) | | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationAPIGetCommentsResponse.new( + status: null, + translations: null, + comments: null, + moderation_filter: null +) +``` + diff --git a/client/docs/ModerationAPIGetLogsResponse.md b/client/docs/ModerationAPIGetLogsResponse.md new file mode 100644 index 0000000..a5eeb35 --- /dev/null +++ b/client/docs/ModerationAPIGetLogsResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::ModerationAPIGetLogsResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **logs** | [**Array<ModerationAPICommentLog>**](ModerationAPICommentLog.md) | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationAPIGetLogsResponse.new( + logs: null, + status: null +) +``` + diff --git a/client/docs/ModerationApi.md b/client/docs/ModerationApi.md new file mode 100644 index 0000000..e3b5b8c --- /dev/null +++ b/client/docs/ModerationApi.md @@ -0,0 +1,2990 @@ +# FastCommentsClient::ModerationApi + +All URIs are relative to *https://fastcomments.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**delete_moderation_vote**](ModerationApi.md#delete_moderation_vote) | **DELETE** /auth/my-account/moderate-comments/vote/{commentId}/{voteId} | | +| [**get_api_comments**](ModerationApi.md#get_api_comments) | **GET** /auth/my-account/moderate-comments/api/comments | | +| [**get_api_export_status**](ModerationApi.md#get_api_export_status) | **GET** /auth/my-account/moderate-comments/api/export/status | | +| [**get_api_ids**](ModerationApi.md#get_api_ids) | **GET** /auth/my-account/moderate-comments/api/ids | | +| [**get_ban_users_from_comment**](ModerationApi.md#get_ban_users_from_comment) | **GET** /auth/my-account/moderate-comments/ban-users/from-comment/{commentId} | | +| [**get_comment_ban_status**](ModerationApi.md#get_comment_ban_status) | **GET** /auth/my-account/moderate-comments/get-comment-ban-status/{commentId} | | +| [**get_comment_children**](ModerationApi.md#get_comment_children) | **GET** /auth/my-account/moderate-comments/comment-children/{commentId} | | +| [**get_count**](ModerationApi.md#get_count) | **GET** /auth/my-account/moderate-comments/count | | +| [**get_counts**](ModerationApi.md#get_counts) | **GET** /auth/my-account/moderate-comments/banned-users/counts | | +| [**get_logs**](ModerationApi.md#get_logs) | **GET** /auth/my-account/moderate-comments/logs/{commentId} | | +| [**get_manual_badges**](ModerationApi.md#get_manual_badges) | **GET** /auth/my-account/moderate-comments/get-manual-badges | | +| [**get_manual_badges_for_user**](ModerationApi.md#get_manual_badges_for_user) | **GET** /auth/my-account/moderate-comments/get-manual-badges-for-user | | +| [**get_moderation_comment**](ModerationApi.md#get_moderation_comment) | **GET** /auth/my-account/moderate-comments/comment/{commentId} | | +| [**get_moderation_comment_text**](ModerationApi.md#get_moderation_comment_text) | **GET** /auth/my-account/moderate-comments/get-comment-text/{commentId} | | +| [**get_pre_ban_summary**](ModerationApi.md#get_pre_ban_summary) | **GET** /auth/my-account/moderate-comments/pre-ban-summary/{commentId} | | +| [**get_search_comments_summary**](ModerationApi.md#get_search_comments_summary) | **GET** /auth/my-account/moderate-comments/search/comments/summary | | +| [**get_search_pages**](ModerationApi.md#get_search_pages) | **GET** /auth/my-account/moderate-comments/search/pages | | +| [**get_search_sites**](ModerationApi.md#get_search_sites) | **GET** /auth/my-account/moderate-comments/search/sites | | +| [**get_search_suggest**](ModerationApi.md#get_search_suggest) | **GET** /auth/my-account/moderate-comments/search/suggest | | +| [**get_search_users**](ModerationApi.md#get_search_users) | **GET** /auth/my-account/moderate-comments/search/users | | +| [**get_trust_factor**](ModerationApi.md#get_trust_factor) | **GET** /auth/my-account/moderate-comments/get-trust-factor | | +| [**get_user_ban_preference**](ModerationApi.md#get_user_ban_preference) | **GET** /auth/my-account/moderate-comments/user-ban-preference | | +| [**get_user_internal_profile**](ModerationApi.md#get_user_internal_profile) | **GET** /auth/my-account/moderate-comments/get-user-internal-profile | | +| [**post_adjust_comment_votes**](ModerationApi.md#post_adjust_comment_votes) | **POST** /auth/my-account/moderate-comments/adjust-comment-votes/{commentId} | | +| [**post_api_export**](ModerationApi.md#post_api_export) | **POST** /auth/my-account/moderate-comments/api/export | | +| [**post_ban_user_from_comment**](ModerationApi.md#post_ban_user_from_comment) | **POST** /auth/my-account/moderate-comments/ban-user/from-comment/{commentId} | | +| [**post_ban_user_undo**](ModerationApi.md#post_ban_user_undo) | **POST** /auth/my-account/moderate-comments/ban-user/undo | | +| [**post_bulk_pre_ban_summary**](ModerationApi.md#post_bulk_pre_ban_summary) | **POST** /auth/my-account/moderate-comments/bulk-pre-ban-summary | | +| [**post_comments_by_ids**](ModerationApi.md#post_comments_by_ids) | **POST** /auth/my-account/moderate-comments/comments-by-ids | | +| [**post_flag_comment**](ModerationApi.md#post_flag_comment) | **POST** /auth/my-account/moderate-comments/flag-comment/{commentId} | | +| [**post_remove_comment**](ModerationApi.md#post_remove_comment) | **POST** /auth/my-account/moderate-comments/remove-comment/{commentId} | | +| [**post_restore_deleted_comment**](ModerationApi.md#post_restore_deleted_comment) | **POST** /auth/my-account/moderate-comments/restore-deleted-comment/{commentId} | | +| [**post_set_comment_approval_status**](ModerationApi.md#post_set_comment_approval_status) | **POST** /auth/my-account/moderate-comments/set-comment-approval-status/{commentId} | | +| [**post_set_comment_review_status**](ModerationApi.md#post_set_comment_review_status) | **POST** /auth/my-account/moderate-comments/set-comment-review-status/{commentId} | | +| [**post_set_comment_spam_status**](ModerationApi.md#post_set_comment_spam_status) | **POST** /auth/my-account/moderate-comments/set-comment-spam-status/{commentId} | | +| [**post_set_comment_text**](ModerationApi.md#post_set_comment_text) | **POST** /auth/my-account/moderate-comments/set-comment-text/{commentId} | | +| [**post_un_flag_comment**](ModerationApi.md#post_un_flag_comment) | **POST** /auth/my-account/moderate-comments/un-flag-comment/{commentId} | | +| [**post_vote**](ModerationApi.md#post_vote) | **POST** /auth/my-account/moderate-comments/vote/{commentId} | | +| [**put_award_badge**](ModerationApi.md#put_award_badge) | **PUT** /auth/my-account/moderate-comments/award-badge | | +| [**put_close_thread**](ModerationApi.md#put_close_thread) | **PUT** /auth/my-account/moderate-comments/close-thread | | +| [**put_remove_badge**](ModerationApi.md#put_remove_badge) | **PUT** /auth/my-account/moderate-comments/remove-badge | | +| [**put_reopen_thread**](ModerationApi.md#put_reopen_thread) | **PUT** /auth/my-account/moderate-comments/reopen-thread | | +| [**set_trust_factor**](ModerationApi.md#set_trust_factor) | **PUT** /auth/my-account/moderate-comments/set-trust-factor | | + + +## delete_moderation_vote + +> delete_moderation_vote(comment_id, vote_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +vote_id = 'vote_id_example' # String | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.delete_moderation_vote(comment_id, vote_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->delete_moderation_vote: #{e}" +end +``` + +#### Using the delete_moderation_vote_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> delete_moderation_vote_with_http_info(comment_id, vote_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.delete_moderation_vote_with_http_info(comment_id, vote_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->delete_moderation_vote_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **vote_id** | **String** | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**VoteDeleteResponse**](VoteDeleteResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_api_comments + +> get_api_comments(opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +opts = { + page: 1.2, # Float | + count: 1.2, # Float | + text_search: 'text_search_example', # String | + by_ip_from_comment: 'by_ip_from_comment_example', # String | + filters: 'filters_example', # String | + search_filters: 'search_filters_example', # String | + sorts: 'sorts_example', # String | + demo: true, # Boolean | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_api_comments(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_api_comments: #{e}" +end +``` + +#### Using the get_api_comments_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_api_comments_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_api_comments_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_api_comments_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **page** | **Float** | | [optional] | +| **count** | **Float** | | [optional] | +| **text_search** | **String** | | [optional] | +| **by_ip_from_comment** | **String** | | [optional] | +| **filters** | **String** | | [optional] | +| **search_filters** | **String** | | [optional] | +| **sorts** | **String** | | [optional] | +| **demo** | **Boolean** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**ModerationAPIGetCommentsResponse**](ModerationAPIGetCommentsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_api_export_status + +> get_api_export_status(opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +opts = { + batch_job_id: 'batch_job_id_example', # String | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_api_export_status(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_api_export_status: #{e}" +end +``` + +#### Using the get_api_export_status_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_api_export_status_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_api_export_status_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_api_export_status_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **batch_job_id** | **String** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**ModerationExportStatusResponse**](ModerationExportStatusResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_api_ids + +> get_api_ids(opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +opts = { + text_search: 'text_search_example', # String | + by_ip_from_comment: 'by_ip_from_comment_example', # String | + filters: 'filters_example', # String | + search_filters: 'search_filters_example', # String | + after_id: 'after_id_example', # String | + demo: true, # Boolean | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_api_ids(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_api_ids: #{e}" +end +``` + +#### Using the get_api_ids_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_api_ids_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_api_ids_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_api_ids_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **text_search** | **String** | | [optional] | +| **by_ip_from_comment** | **String** | | [optional] | +| **filters** | **String** | | [optional] | +| **search_filters** | **String** | | [optional] | +| **after_id** | **String** | | [optional] | +| **demo** | **Boolean** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**ModerationAPIGetCommentIdsResponse**](ModerationAPIGetCommentIdsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_ban_users_from_comment + +> get_ban_users_from_comment(comment_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_ban_users_from_comment(comment_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_ban_users_from_comment: #{e}" +end +``` + +#### Using the get_ban_users_from_comment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_ban_users_from_comment_with_http_info(comment_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_ban_users_from_comment_with_http_info(comment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_ban_users_from_comment_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**GetBannedUsersFromCommentResponse**](GetBannedUsersFromCommentResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_comment_ban_status + +> get_comment_ban_status(comment_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_comment_ban_status(comment_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_comment_ban_status: #{e}" +end +``` + +#### Using the get_comment_ban_status_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_comment_ban_status_with_http_info(comment_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_comment_ban_status_with_http_info(comment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_comment_ban_status_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**GetCommentBanStatusResponse**](GetCommentBanStatusResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_comment_children + +> get_comment_children(comment_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_comment_children(comment_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_comment_children: #{e}" +end +``` + +#### Using the get_comment_children_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_comment_children_with_http_info(comment_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_comment_children_with_http_info(comment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_comment_children_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**ModerationAPIChildCommentsResponse**](ModerationAPIChildCommentsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_count + +> get_count(opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +opts = { + text_search: 'text_search_example', # String | + by_ip_from_comment: 'by_ip_from_comment_example', # String | + filter: 'filter_example', # String | + search_filters: 'search_filters_example', # String | + demo: true, # Boolean | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_count(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_count: #{e}" +end +``` + +#### Using the get_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_count_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_count_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **text_search** | **String** | | [optional] | +| **by_ip_from_comment** | **String** | | [optional] | +| **filter** | **String** | | [optional] | +| **search_filters** | **String** | | [optional] | +| **demo** | **Boolean** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**ModerationAPICountCommentsResponse**](ModerationAPICountCommentsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_counts + +> get_counts(opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_counts(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_counts: #{e}" +end +``` + +#### Using the get_counts_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_counts_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_counts_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_counts_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **sso** | **String** | | [optional] | + +### Return type + +[**GetBannedUsersCountResponse**](GetBannedUsersCountResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_logs + +> get_logs(comment_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_logs(comment_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_logs: #{e}" +end +``` + +#### Using the get_logs_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_logs_with_http_info(comment_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_logs_with_http_info(comment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_logs_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**ModerationAPIGetLogsResponse**](ModerationAPIGetLogsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_manual_badges + +> get_manual_badges(opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_manual_badges(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_manual_badges: #{e}" +end +``` + +#### Using the get_manual_badges_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_manual_badges_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_manual_badges_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_manual_badges_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **sso** | **String** | | [optional] | + +### Return type + +[**GetTenantManualBadgesResponse**](GetTenantManualBadgesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_manual_badges_for_user + +> get_manual_badges_for_user(opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +opts = { + badges_user_id: 'badges_user_id_example', # String | + comment_id: 'comment_id_example', # String | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_manual_badges_for_user(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_manual_badges_for_user: #{e}" +end +``` + +#### Using the get_manual_badges_for_user_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_manual_badges_for_user_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_manual_badges_for_user_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_manual_badges_for_user_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **badges_user_id** | **String** | | [optional] | +| **comment_id** | **String** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**GetUserManualBadgesResponse**](GetUserManualBadgesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_moderation_comment + +> get_moderation_comment(comment_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +opts = { + include_email: true, # Boolean | + include_ip: true, # Boolean | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_moderation_comment(comment_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_moderation_comment: #{e}" +end +``` + +#### Using the get_moderation_comment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_moderation_comment_with_http_info(comment_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_moderation_comment_with_http_info(comment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_moderation_comment_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **include_email** | **Boolean** | | [optional] | +| **include_ip** | **Boolean** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**ModerationAPICommentResponse**](ModerationAPICommentResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_moderation_comment_text + +> get_moderation_comment_text(comment_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_moderation_comment_text(comment_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_moderation_comment_text: #{e}" +end +``` + +#### Using the get_moderation_comment_text_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_moderation_comment_text_with_http_info(comment_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_moderation_comment_text_with_http_info(comment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_moderation_comment_text_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**GetCommentTextResponse**](GetCommentTextResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_pre_ban_summary + +> get_pre_ban_summary(comment_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +opts = { + include_by_user_id_and_email: true, # Boolean | + include_by_ip: true, # Boolean | + include_by_email_domain: true, # Boolean | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_pre_ban_summary(comment_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_pre_ban_summary: #{e}" +end +``` + +#### Using the get_pre_ban_summary_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_pre_ban_summary_with_http_info(comment_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_pre_ban_summary_with_http_info(comment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_pre_ban_summary_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **include_by_user_id_and_email** | **Boolean** | | [optional] | +| **include_by_ip** | **Boolean** | | [optional] | +| **include_by_email_domain** | **Boolean** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**PreBanSummary**](PreBanSummary.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_search_comments_summary + +> get_search_comments_summary(opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +opts = { + value: 'value_example', # String | + filters: 'filters_example', # String | + search_filters: 'search_filters_example', # String | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_search_comments_summary(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_search_comments_summary: #{e}" +end +``` + +#### Using the get_search_comments_summary_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_search_comments_summary_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_search_comments_summary_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_search_comments_summary_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **value** | **String** | | [optional] | +| **filters** | **String** | | [optional] | +| **search_filters** | **String** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**ModerationCommentSearchResponse**](ModerationCommentSearchResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_search_pages + +> get_search_pages(opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +opts = { + value: 'value_example', # String | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_search_pages(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_search_pages: #{e}" +end +``` + +#### Using the get_search_pages_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_search_pages_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_search_pages_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_search_pages_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **value** | **String** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**ModerationPageSearchResponse**](ModerationPageSearchResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_search_sites + +> get_search_sites(opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +opts = { + value: 'value_example', # String | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_search_sites(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_search_sites: #{e}" +end +``` + +#### Using the get_search_sites_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_search_sites_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_search_sites_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_search_sites_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **value** | **String** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**ModerationSiteSearchResponse**](ModerationSiteSearchResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_search_suggest + +> get_search_suggest(opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +opts = { + text_search: 'text_search_example', # String | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_search_suggest(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_search_suggest: #{e}" +end +``` + +#### Using the get_search_suggest_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_search_suggest_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_search_suggest_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_search_suggest_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **text_search** | **String** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**ModerationSuggestResponse**](ModerationSuggestResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_search_users + +> get_search_users(opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +opts = { + value: 'value_example', # String | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_search_users(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_search_users: #{e}" +end +``` + +#### Using the get_search_users_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_search_users_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_search_users_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_search_users_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **value** | **String** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**ModerationUserSearchResponse**](ModerationUserSearchResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_trust_factor + +> get_trust_factor(opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +opts = { + user_id: 'user_id_example', # String | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_trust_factor(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_trust_factor: #{e}" +end +``` + +#### Using the get_trust_factor_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_trust_factor_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_trust_factor_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_trust_factor_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_id** | **String** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**GetUserTrustFactorResponse**](GetUserTrustFactorResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_user_ban_preference + +> get_user_ban_preference(opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_user_ban_preference(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_user_ban_preference: #{e}" +end +``` + +#### Using the get_user_ban_preference_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_user_ban_preference_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_user_ban_preference_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_user_ban_preference_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **sso** | **String** | | [optional] | + +### Return type + +[**APIModerateGetUserBanPreferencesResponse**](APIModerateGetUserBanPreferencesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_user_internal_profile + +> get_user_internal_profile(opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +opts = { + comment_id: 'comment_id_example', # String | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_user_internal_profile(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_user_internal_profile: #{e}" +end +``` + +#### Using the get_user_internal_profile_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_user_internal_profile_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_user_internal_profile_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->get_user_internal_profile_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**GetUserInternalProfileResponse**](GetUserInternalProfileResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## post_adjust_comment_votes + +> post_adjust_comment_votes(comment_id, adjust_comment_votes_params, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +adjust_comment_votes_params = FastCommentsClient::AdjustCommentVotesParams.new({adjust_vote_amount: 3.56}) # AdjustCommentVotesParams | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.post_adjust_comment_votes(comment_id, adjust_comment_votes_params, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_adjust_comment_votes: #{e}" +end +``` + +#### Using the post_adjust_comment_votes_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_adjust_comment_votes_with_http_info(comment_id, adjust_comment_votes_params, opts) + +```ruby +begin + + data, status_code, headers = api_instance.post_adjust_comment_votes_with_http_info(comment_id, adjust_comment_votes_params, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_adjust_comment_votes_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **adjust_comment_votes_params** | [**AdjustCommentVotesParams**](AdjustCommentVotesParams.md) | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**AdjustVotesResponse**](AdjustVotesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## post_api_export + +> post_api_export(opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +opts = { + text_search: 'text_search_example', # String | + by_ip_from_comment: 'by_ip_from_comment_example', # String | + filters: 'filters_example', # String | + search_filters: 'search_filters_example', # String | + sorts: 'sorts_example', # String | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.post_api_export(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_api_export: #{e}" +end +``` + +#### Using the post_api_export_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_api_export_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.post_api_export_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_api_export_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **text_search** | **String** | | [optional] | +| **by_ip_from_comment** | **String** | | [optional] | +| **filters** | **String** | | [optional] | +| **search_filters** | **String** | | [optional] | +| **sorts** | **String** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**ModerationExportResponse**](ModerationExportResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## post_ban_user_from_comment + +> post_ban_user_from_comment(comment_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +opts = { + ban_email: true, # Boolean | + ban_email_domain: true, # Boolean | + ban_ip: true, # Boolean | + delete_all_users_comments: true, # Boolean | + banned_until: 'banned_until_example', # String | + is_shadow_ban: true, # Boolean | + update_id: 'update_id_example', # String | + ban_reason: 'ban_reason_example', # String | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.post_ban_user_from_comment(comment_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_ban_user_from_comment: #{e}" +end +``` + +#### Using the post_ban_user_from_comment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_ban_user_from_comment_with_http_info(comment_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.post_ban_user_from_comment_with_http_info(comment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_ban_user_from_comment_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **ban_email** | **Boolean** | | [optional] | +| **ban_email_domain** | **Boolean** | | [optional] | +| **ban_ip** | **Boolean** | | [optional] | +| **delete_all_users_comments** | **Boolean** | | [optional] | +| **banned_until** | **String** | | [optional] | +| **is_shadow_ban** | **Boolean** | | [optional] | +| **update_id** | **String** | | [optional] | +| **ban_reason** | **String** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**BanUserFromCommentResult**](BanUserFromCommentResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## post_ban_user_undo + +> post_ban_user_undo(ban_user_undo_params, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +ban_user_undo_params = FastCommentsClient::BanUserUndoParams.new({changelog: FastCommentsClient::APIBanUserChangeLog.new}) # BanUserUndoParams | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.post_ban_user_undo(ban_user_undo_params, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_ban_user_undo: #{e}" +end +``` + +#### Using the post_ban_user_undo_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_ban_user_undo_with_http_info(ban_user_undo_params, opts) + +```ruby +begin + + data, status_code, headers = api_instance.post_ban_user_undo_with_http_info(ban_user_undo_params, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_ban_user_undo_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ban_user_undo_params** | [**BanUserUndoParams**](BanUserUndoParams.md) | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**APIEmptyResponse**](APIEmptyResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## post_bulk_pre_ban_summary + +> post_bulk_pre_ban_summary(bulk_pre_ban_params, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +bulk_pre_ban_params = FastCommentsClient::BulkPreBanParams.new({comment_ids: ['comment_ids_example']}) # BulkPreBanParams | +opts = { + include_by_user_id_and_email: true, # Boolean | + include_by_ip: true, # Boolean | + include_by_email_domain: true, # Boolean | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.post_bulk_pre_ban_summary(bulk_pre_ban_params, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_bulk_pre_ban_summary: #{e}" +end +``` + +#### Using the post_bulk_pre_ban_summary_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_bulk_pre_ban_summary_with_http_info(bulk_pre_ban_params, opts) + +```ruby +begin + + data, status_code, headers = api_instance.post_bulk_pre_ban_summary_with_http_info(bulk_pre_ban_params, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_bulk_pre_ban_summary_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **bulk_pre_ban_params** | [**BulkPreBanParams**](BulkPreBanParams.md) | | | +| **include_by_user_id_and_email** | **Boolean** | | [optional] | +| **include_by_ip** | **Boolean** | | [optional] | +| **include_by_email_domain** | **Boolean** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**BulkPreBanSummary**](BulkPreBanSummary.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## post_comments_by_ids + +> post_comments_by_ids(comments_by_ids_params, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comments_by_ids_params = FastCommentsClient::CommentsByIdsParams.new({ids: ['ids_example']}) # CommentsByIdsParams | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.post_comments_by_ids(comments_by_ids_params, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_comments_by_ids: #{e}" +end +``` + +#### Using the post_comments_by_ids_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_comments_by_ids_with_http_info(comments_by_ids_params, opts) + +```ruby +begin + + data, status_code, headers = api_instance.post_comments_by_ids_with_http_info(comments_by_ids_params, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_comments_by_ids_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comments_by_ids_params** | [**CommentsByIdsParams**](CommentsByIdsParams.md) | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**ModerationAPIChildCommentsResponse**](ModerationAPIChildCommentsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## post_flag_comment + +> post_flag_comment(comment_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.post_flag_comment(comment_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_flag_comment: #{e}" +end +``` + +#### Using the post_flag_comment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_flag_comment_with_http_info(comment_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.post_flag_comment_with_http_info(comment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_flag_comment_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**APIEmptyResponse**](APIEmptyResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## post_remove_comment + +> post_remove_comment(comment_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.post_remove_comment(comment_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_remove_comment: #{e}" +end +``` + +#### Using the post_remove_comment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_remove_comment_with_http_info(comment_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.post_remove_comment_with_http_info(comment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_remove_comment_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**PostRemoveCommentResponse**](PostRemoveCommentResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## post_restore_deleted_comment + +> post_restore_deleted_comment(comment_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.post_restore_deleted_comment(comment_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_restore_deleted_comment: #{e}" +end +``` + +#### Using the post_restore_deleted_comment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_restore_deleted_comment_with_http_info(comment_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.post_restore_deleted_comment_with_http_info(comment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_restore_deleted_comment_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**APIEmptyResponse**](APIEmptyResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## post_set_comment_approval_status + +> post_set_comment_approval_status(comment_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +opts = { + approved: true, # Boolean | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.post_set_comment_approval_status(comment_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_set_comment_approval_status: #{e}" +end +``` + +#### Using the post_set_comment_approval_status_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_set_comment_approval_status_with_http_info(comment_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.post_set_comment_approval_status_with_http_info(comment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_set_comment_approval_status_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **approved** | **Boolean** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**SetCommentApprovedResponse**](SetCommentApprovedResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## post_set_comment_review_status + +> post_set_comment_review_status(comment_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +opts = { + reviewed: true, # Boolean | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.post_set_comment_review_status(comment_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_set_comment_review_status: #{e}" +end +``` + +#### Using the post_set_comment_review_status_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_set_comment_review_status_with_http_info(comment_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.post_set_comment_review_status_with_http_info(comment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_set_comment_review_status_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **reviewed** | **Boolean** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**APIEmptyResponse**](APIEmptyResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## post_set_comment_spam_status + +> post_set_comment_spam_status(comment_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +opts = { + spam: true, # Boolean | + perm_not_spam: true, # Boolean | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.post_set_comment_spam_status(comment_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_set_comment_spam_status: #{e}" +end +``` + +#### Using the post_set_comment_spam_status_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_set_comment_spam_status_with_http_info(comment_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.post_set_comment_spam_status_with_http_info(comment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_set_comment_spam_status_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **spam** | **Boolean** | | [optional] | +| **perm_not_spam** | **Boolean** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**APIEmptyResponse**](APIEmptyResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## post_set_comment_text + +> post_set_comment_text(comment_id, set_comment_text_params, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +set_comment_text_params = FastCommentsClient::SetCommentTextParams.new({comment: 'comment_example'}) # SetCommentTextParams | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.post_set_comment_text(comment_id, set_comment_text_params, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_set_comment_text: #{e}" +end +``` + +#### Using the post_set_comment_text_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_set_comment_text_with_http_info(comment_id, set_comment_text_params, opts) + +```ruby +begin + + data, status_code, headers = api_instance.post_set_comment_text_with_http_info(comment_id, set_comment_text_params, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_set_comment_text_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **set_comment_text_params** | [**SetCommentTextParams**](SetCommentTextParams.md) | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**SetCommentTextResponse**](SetCommentTextResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## post_un_flag_comment + +> post_un_flag_comment(comment_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.post_un_flag_comment(comment_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_un_flag_comment: #{e}" +end +``` + +#### Using the post_un_flag_comment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_un_flag_comment_with_http_info(comment_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.post_un_flag_comment_with_http_info(comment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_un_flag_comment_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**APIEmptyResponse**](APIEmptyResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## post_vote + +> post_vote(comment_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +comment_id = 'comment_id_example' # String | +opts = { + direction: 'direction_example', # String | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.post_vote(comment_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_vote: #{e}" +end +``` + +#### Using the post_vote_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_vote_with_http_info(comment_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.post_vote_with_http_info(comment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->post_vote_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_id** | **String** | | | +| **direction** | **String** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**VoteResponse**](VoteResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## put_award_badge + +> put_award_badge(badge_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +badge_id = 'badge_id_example' # String | +opts = { + user_id: 'user_id_example', # String | + comment_id: 'comment_id_example', # String | + broadcast_id: 'broadcast_id_example', # String | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.put_award_badge(badge_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->put_award_badge: #{e}" +end +``` + +#### Using the put_award_badge_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> put_award_badge_with_http_info(badge_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.put_award_badge_with_http_info(badge_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->put_award_badge_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **badge_id** | **String** | | | +| **user_id** | **String** | | [optional] | +| **comment_id** | **String** | | [optional] | +| **broadcast_id** | **String** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**AwardUserBadgeResponse**](AwardUserBadgeResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## put_close_thread + +> put_close_thread(url_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +url_id = 'url_id_example' # String | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.put_close_thread(url_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->put_close_thread: #{e}" +end +``` + +#### Using the put_close_thread_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> put_close_thread_with_http_info(url_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.put_close_thread_with_http_info(url_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->put_close_thread_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **url_id** | **String** | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**APIEmptyResponse**](APIEmptyResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## put_remove_badge + +> put_remove_badge(badge_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +badge_id = 'badge_id_example' # String | +opts = { + user_id: 'user_id_example', # String | + comment_id: 'comment_id_example', # String | + broadcast_id: 'broadcast_id_example', # String | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.put_remove_badge(badge_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->put_remove_badge: #{e}" +end +``` + +#### Using the put_remove_badge_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> put_remove_badge_with_http_info(badge_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.put_remove_badge_with_http_info(badge_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->put_remove_badge_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **badge_id** | **String** | | | +| **user_id** | **String** | | [optional] | +| **comment_id** | **String** | | [optional] | +| **broadcast_id** | **String** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**RemoveUserBadgeResponse**](RemoveUserBadgeResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## put_reopen_thread + +> put_reopen_thread(url_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +url_id = 'url_id_example' # String | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.put_reopen_thread(url_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->put_reopen_thread: #{e}" +end +``` + +#### Using the put_reopen_thread_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> put_reopen_thread_with_http_info(url_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.put_reopen_thread_with_http_info(url_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->put_reopen_thread_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **url_id** | **String** | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**APIEmptyResponse**](APIEmptyResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## set_trust_factor + +> set_trust_factor(opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::ModerationApi.new +opts = { + user_id: 'user_id_example', # String | + trust_factor: 'trust_factor_example', # String | + sso: 'sso_example' # String | +} + +begin + + result = api_instance.set_trust_factor(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->set_trust_factor: #{e}" +end +``` + +#### Using the set_trust_factor_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> set_trust_factor_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.set_trust_factor_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling ModerationApi->set_trust_factor_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_id** | **String** | | [optional] | +| **trust_factor** | **String** | | [optional] | +| **sso** | **String** | | [optional] | + +### Return type + +[**SetUserTrustFactorResponse**](SetUserTrustFactorResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/client/docs/ModerationCommentSearchResponse.md b/client/docs/ModerationCommentSearchResponse.md new file mode 100644 index 0000000..9d5677e --- /dev/null +++ b/client/docs/ModerationCommentSearchResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::ModerationCommentSearchResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment_count** | **Integer** | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationCommentSearchResponse.new( + comment_count: null, + status: null +) +``` + diff --git a/client/docs/ModerationExportResponse.md b/client/docs/ModerationExportResponse.md new file mode 100644 index 0000000..3856d53 --- /dev/null +++ b/client/docs/ModerationExportResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::ModerationExportResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | **String** | | | +| **batch_job_id** | **String** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationExportResponse.new( + status: null, + batch_job_id: null +) +``` + diff --git a/client/docs/ModerationExportStatusResponse.md b/client/docs/ModerationExportStatusResponse.md new file mode 100644 index 0000000..454f551 --- /dev/null +++ b/client/docs/ModerationExportStatusResponse.md @@ -0,0 +1,24 @@ +# FastCommentsClient::ModerationExportStatusResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | **String** | | | +| **job_status** | **String** | | | +| **record_count** | **Integer** | | | +| **download_url** | **String** | | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationExportStatusResponse.new( + status: null, + job_status: null, + record_count: null, + download_url: null +) +``` + diff --git a/client/docs/ModerationFilter.md b/client/docs/ModerationFilter.md new file mode 100644 index 0000000..428d0f3 --- /dev/null +++ b/client/docs/ModerationFilter.md @@ -0,0 +1,40 @@ +# FastCommentsClient::ModerationFilter + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **reviewed** | **Boolean** | | [optional] | +| **approved** | **Boolean** | | [optional] | +| **is_spam** | **Boolean** | | [optional] | +| **is_banned_user** | **Boolean** | | [optional] | +| **is_locked** | **Boolean** | | [optional] | +| **flag_count_gt** | **Float** | | [optional] | +| **user_id** | **String** | | [optional] | +| **url_id** | **String** | | [optional] | +| **domain** | **String** | | [optional] | +| **moderation_group_ids** | **Array<String>** | | [optional] | +| **comment_text_search** | **Array<String>** | Text search terms. Each term is matched case-insensitively against the comment text. A term wrapped in quotes means exact phrase match. | [optional] | +| **exact_comment_text** | **String** | Set by the `exact=\"...\"` search syntax. The comment text must equal this value exactly (case-sensitive, full-string), as opposed to the substring matching of commentTextSearch. | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationFilter.new( + reviewed: null, + approved: null, + is_spam: null, + is_banned_user: null, + is_locked: null, + flag_count_gt: null, + user_id: null, + url_id: null, + domain: null, + moderation_group_ids: null, + comment_text_search: null, + exact_comment_text: null +) +``` + diff --git a/client/docs/ModerationPageSearchProjected.md b/client/docs/ModerationPageSearchProjected.md new file mode 100644 index 0000000..0a5f6e5 --- /dev/null +++ b/client/docs/ModerationPageSearchProjected.md @@ -0,0 +1,24 @@ +# FastCommentsClient::ModerationPageSearchProjected + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **url_id** | **String** | | | +| **url** | **String** | | | +| **title** | **String** | | | +| **comment_count** | **Float** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationPageSearchProjected.new( + url_id: null, + url: null, + title: null, + comment_count: null +) +``` + diff --git a/client/docs/ModerationPageSearchResponse.md b/client/docs/ModerationPageSearchResponse.md new file mode 100644 index 0000000..d724b43 --- /dev/null +++ b/client/docs/ModerationPageSearchResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::ModerationPageSearchResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **pages** | [**Array<ModerationPageSearchProjected>**](ModerationPageSearchProjected.md) | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationPageSearchResponse.new( + pages: null, + status: null +) +``` + diff --git a/client/docs/ModerationSiteSearchProjected.md b/client/docs/ModerationSiteSearchProjected.md new file mode 100644 index 0000000..26e6396 --- /dev/null +++ b/client/docs/ModerationSiteSearchProjected.md @@ -0,0 +1,20 @@ +# FastCommentsClient::ModerationSiteSearchProjected + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **domain** | **String** | | | +| **logo_src100px** | **String** | | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationSiteSearchProjected.new( + domain: null, + logo_src100px: null +) +``` + diff --git a/client/docs/ModerationSiteSearchResponse.md b/client/docs/ModerationSiteSearchResponse.md new file mode 100644 index 0000000..7ea803e --- /dev/null +++ b/client/docs/ModerationSiteSearchResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::ModerationSiteSearchResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **sites** | [**Array<ModerationSiteSearchProjected>**](ModerationSiteSearchProjected.md) | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationSiteSearchResponse.new( + sites: null, + status: null +) +``` + diff --git a/client/docs/ModerationSuggestResponse.md b/client/docs/ModerationSuggestResponse.md new file mode 100644 index 0000000..3637fcd --- /dev/null +++ b/client/docs/ModerationSuggestResponse.md @@ -0,0 +1,24 @@ +# FastCommentsClient::ModerationSuggestResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | **String** | | | +| **pages** | [**Array<ModerationPageSearchProjected>**](ModerationPageSearchProjected.md) | | [optional] | +| **users** | [**Array<ModerationUserSearchProjected>**](ModerationUserSearchProjected.md) | | [optional] | +| **code** | **String** | | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationSuggestResponse.new( + status: null, + pages: null, + users: null, + code: null +) +``` + diff --git a/client/docs/ModerationUserSearchProjected.md b/client/docs/ModerationUserSearchProjected.md new file mode 100644 index 0000000..2fb4d70 --- /dev/null +++ b/client/docs/ModerationUserSearchProjected.md @@ -0,0 +1,24 @@ +# FastCommentsClient::ModerationUserSearchProjected + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **_id** | **String** | | | +| **username** | **String** | | | +| **display_name** | **String** | | [optional] | +| **avatar_src** | **String** | | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationUserSearchProjected.new( + _id: null, + username: null, + display_name: null, + avatar_src: null +) +``` + diff --git a/client/docs/ModerationUserSearchResponse.md b/client/docs/ModerationUserSearchResponse.md new file mode 100644 index 0000000..7da2775 --- /dev/null +++ b/client/docs/ModerationUserSearchResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::ModerationUserSearchResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **users** | [**Array<ModerationUserSearchProjected>**](ModerationUserSearchProjected.md) | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::ModerationUserSearchResponse.new( + users: null, + status: null +) +``` + diff --git a/client/docs/PageUserEntry.md b/client/docs/PageUserEntry.md new file mode 100644 index 0000000..5fa8dd8 --- /dev/null +++ b/client/docs/PageUserEntry.md @@ -0,0 +1,24 @@ +# FastCommentsClient::PageUserEntry + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **is_private** | **Boolean** | | [optional] | +| **avatar_src** | **String** | | [optional] | +| **display_name** | **String** | | | +| **id** | **String** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::PageUserEntry.new( + is_private: null, + avatar_src: null, + display_name: null, + id: null +) +``` + diff --git a/client/docs/PageUsersInfoResponse.md b/client/docs/PageUsersInfoResponse.md new file mode 100644 index 0000000..9ad4138 --- /dev/null +++ b/client/docs/PageUsersInfoResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::PageUsersInfoResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **users** | [**Array<PageUserEntry>**](PageUserEntry.md) | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::PageUsersInfoResponse.new( + users: null, + status: null +) +``` + diff --git a/client/docs/PageUsersOfflineResponse.md b/client/docs/PageUsersOfflineResponse.md new file mode 100644 index 0000000..be0a25b --- /dev/null +++ b/client/docs/PageUsersOfflineResponse.md @@ -0,0 +1,24 @@ +# FastCommentsClient::PageUsersOfflineResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **next_after_user_id** | **String** | | | +| **next_after_name** | **String** | | | +| **users** | [**Array<PageUserEntry>**](PageUserEntry.md) | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::PageUsersOfflineResponse.new( + next_after_user_id: null, + next_after_name: null, + users: null, + status: null +) +``` + diff --git a/client/docs/PageUsersOnlineResponse.md b/client/docs/PageUsersOnlineResponse.md new file mode 100644 index 0000000..59b9143 --- /dev/null +++ b/client/docs/PageUsersOnlineResponse.md @@ -0,0 +1,28 @@ +# FastCommentsClient::PageUsersOnlineResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **next_after_user_id** | **String** | | | +| **next_after_name** | **String** | | | +| **total_count** | **Float** | | | +| **anon_count** | **Float** | | | +| **users** | [**Array<PageUserEntry>**](PageUserEntry.md) | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::PageUsersOnlineResponse.new( + next_after_user_id: null, + next_after_name: null, + total_count: null, + anon_count: null, + users: null, + status: null +) +``` + diff --git a/client/docs/PagesSortBy.md b/client/docs/PagesSortBy.md new file mode 100644 index 0000000..6e2d0f0 --- /dev/null +++ b/client/docs/PagesSortBy.md @@ -0,0 +1,15 @@ +# FastCommentsClient::PagesSortBy + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::PagesSortBy.new() +``` + diff --git a/client/docs/PatchDomainConfigResponse.md b/client/docs/PatchDomainConfigResponse.md new file mode 100644 index 0000000..23ac8eb --- /dev/null +++ b/client/docs/PatchDomainConfigResponse.md @@ -0,0 +1,24 @@ +# FastCommentsClient::PatchDomainConfigResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **configuration** | **Object** | | | +| **status** | **Object** | | | +| **reason** | **String** | | | +| **code** | **String** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::PatchDomainConfigResponse.new( + configuration: null, + status: null, + reason: null, + code: null +) +``` + diff --git a/client/docs/PinComment200Response.md b/client/docs/PinComment200Response.md deleted file mode 100644 index 76a1da7..0000000 --- a/client/docs/PinComment200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::PinComment200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **comment_positions** | [**Hash<String, RecordStringBeforeStringOrNullAfterStringOrNullValue>**](RecordStringBeforeStringOrNullAfterStringOrNullValue.md) | Construct a type with a set of properties K of type T | | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::PinComment200Response.new( - comment_positions: null, - status: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/PostRemoveCommentResponse.md b/client/docs/PostRemoveCommentResponse.md new file mode 100644 index 0000000..2c1425c --- /dev/null +++ b/client/docs/PostRemoveCommentResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::PostRemoveCommentResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **action** | **String** | | | +| **status** | **String** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::PostRemoveCommentResponse.new( + action: null, + status: null +) +``` + diff --git a/client/docs/PreBanSummary.md b/client/docs/PreBanSummary.md new file mode 100644 index 0000000..0d409b1 --- /dev/null +++ b/client/docs/PreBanSummary.md @@ -0,0 +1,22 @@ +# FastCommentsClient::PreBanSummary + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | [**APIStatus**](APIStatus.md) | | | +| **usernames** | **Array<String>** | | | +| **count** | **Float** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::PreBanSummary.new( + status: null, + usernames: null, + count: null +) +``` + diff --git a/client/docs/PublicApi.md b/client/docs/PublicApi.md index 06a5d6a..0a55969 100644 --- a/client/docs/PublicApi.md +++ b/client/docs/PublicApi.md @@ -8,22 +8,39 @@ All URIs are relative to *https://fastcomments.com* | [**checked_comments_for_blocked**](PublicApi.md#checked_comments_for_blocked) | **GET** /check-blocked-comments | | | [**create_comment_public**](PublicApi.md#create_comment_public) | **POST** /comments/{tenantId} | | | [**create_feed_post_public**](PublicApi.md#create_feed_post_public) | **POST** /feed-posts/{tenantId} | | +| [**create_v1_page_react**](PublicApi.md#create_v1_page_react) | **POST** /page-reacts/v1/likes/{tenantId} | | +| [**create_v2_page_react**](PublicApi.md#create_v2_page_react) | **POST** /page-reacts/v2/{tenantId} | | | [**delete_comment_public**](PublicApi.md#delete_comment_public) | **DELETE** /comments/{tenantId}/{commentId} | | | [**delete_comment_vote**](PublicApi.md#delete_comment_vote) | **DELETE** /comments/{tenantId}/{commentId}/vote/{voteId} | | | [**delete_feed_post_public**](PublicApi.md#delete_feed_post_public) | **DELETE** /feed-posts/{tenantId}/{postId} | | +| [**delete_v1_page_react**](PublicApi.md#delete_v1_page_react) | **DELETE** /page-reacts/v1/likes/{tenantId} | | +| [**delete_v2_page_react**](PublicApi.md#delete_v2_page_react) | **DELETE** /page-reacts/v2/{tenantId} | | | [**flag_comment_public**](PublicApi.md#flag_comment_public) | **POST** /flag-comment/{commentId} | | | [**get_comment_text**](PublicApi.md#get_comment_text) | **GET** /comments/{tenantId}/{commentId}/text | | | [**get_comment_vote_user_names**](PublicApi.md#get_comment_vote_user_names) | **GET** /comments/{tenantId}/{commentId}/votes | | +| [**get_comments_for_user**](PublicApi.md#get_comments_for_user) | **GET** /comments-for-user | | | [**get_comments_public**](PublicApi.md#get_comments_public) | **GET** /comments/{tenantId} | | | [**get_event_log**](PublicApi.md#get_event_log) | **GET** /event-log/{tenantId} | | | [**get_feed_posts_public**](PublicApi.md#get_feed_posts_public) | **GET** /feed-posts/{tenantId} | | | [**get_feed_posts_stats**](PublicApi.md#get_feed_posts_stats) | **GET** /feed-posts/{tenantId}/stats | | +| [**get_gif_large**](PublicApi.md#get_gif_large) | **GET** /gifs/get-large/{tenantId} | | +| [**get_gifs_search**](PublicApi.md#get_gifs_search) | **GET** /gifs/search/{tenantId} | | +| [**get_gifs_trending**](PublicApi.md#get_gifs_trending) | **GET** /gifs/trending/{tenantId} | | | [**get_global_event_log**](PublicApi.md#get_global_event_log) | **GET** /event-log/global/{tenantId} | | +| [**get_offline_users**](PublicApi.md#get_offline_users) | **GET** /pages/{tenantId}/users/offline | | +| [**get_online_users**](PublicApi.md#get_online_users) | **GET** /pages/{tenantId}/users/online | | +| [**get_pages_public**](PublicApi.md#get_pages_public) | **GET** /pages/{tenantId} | | +| [**get_translations**](PublicApi.md#get_translations) | **GET** /translations/{namespace}/{component} | | | [**get_user_notification_count**](PublicApi.md#get_user_notification_count) | **GET** /user-notifications/get-count | | | [**get_user_notifications**](PublicApi.md#get_user_notifications) | **GET** /user-notifications | | | [**get_user_presence_statuses**](PublicApi.md#get_user_presence_statuses) | **GET** /user-presence-status | | | [**get_user_reacts_public**](PublicApi.md#get_user_reacts_public) | **GET** /feed-posts/{tenantId}/user-reacts | | +| [**get_users_info**](PublicApi.md#get_users_info) | **GET** /pages/{tenantId}/users/info | | +| [**get_v1_page_likes**](PublicApi.md#get_v1_page_likes) | **GET** /page-reacts/v1/likes/{tenantId} | | +| [**get_v2_page_react_users**](PublicApi.md#get_v2_page_react_users) | **GET** /page-reacts/v2/{tenantId}/list | | +| [**get_v2_page_reacts**](PublicApi.md#get_v2_page_reacts) | **GET** /page-reacts/v2/{tenantId} | | | [**lock_comment**](PublicApi.md#lock_comment) | **POST** /comments/{tenantId}/{commentId}/lock | | +| [**logout_public**](PublicApi.md#logout_public) | **PUT** /auth/logout | | | [**pin_comment**](PublicApi.md#pin_comment) | **POST** /comments/{tenantId}/{commentId}/pin | | | [**react_feed_post_public**](PublicApi.md#react_feed_post_public) | **POST** /feed-posts/{tenantId}/react/{postId} | | | [**reset_user_notification_count**](PublicApi.md#reset_user_notification_count) | **POST** /user-notifications/reset-count | | @@ -43,7 +60,7 @@ All URIs are relative to *https://fastcomments.com* ## block_from_comment_public -> block_from_comment_public(tenant_id, comment_id, public_block_from_comment_params, opts) +> block_from_comment_public(tenant_id, comment_id, public_block_from_comment_params, opts) @@ -74,7 +91,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> block_from_comment_public_with_http_info(tenant_id, comment_id, public_block_from_comment_params, opts) +> , Integer, Hash)> block_from_comment_public_with_http_info(tenant_id, comment_id, public_block_from_comment_params, opts) ```ruby begin @@ -82,7 +99,7 @@ begin data, status_code, headers = api_instance.block_from_comment_public_with_http_info(tenant_id, comment_id, public_block_from_comment_params, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->block_from_comment_public_with_http_info: #{e}" end @@ -99,7 +116,7 @@ end ### Return type -[**BlockFromCommentPublic200Response**](BlockFromCommentPublic200Response.md) +[**BlockSuccess**](BlockSuccess.md) ### Authorization @@ -113,7 +130,7 @@ No authorization required ## checked_comments_for_blocked -> checked_comments_for_blocked(tenant_id, comment_ids, opts) +> checked_comments_for_blocked(tenant_id, comment_ids, opts) @@ -143,7 +160,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> checked_comments_for_blocked_with_http_info(tenant_id, comment_ids, opts) +> , Integer, Hash)> checked_comments_for_blocked_with_http_info(tenant_id, comment_ids, opts) ```ruby begin @@ -151,7 +168,7 @@ begin data, status_code, headers = api_instance.checked_comments_for_blocked_with_http_info(tenant_id, comment_ids, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->checked_comments_for_blocked_with_http_info: #{e}" end @@ -167,7 +184,7 @@ end ### Return type -[**CheckedCommentsForBlocked200Response**](CheckedCommentsForBlocked200Response.md) +[**CheckBlockedCommentsResponse**](CheckBlockedCommentsResponse.md) ### Authorization @@ -181,7 +198,7 @@ No authorization required ## create_comment_public -> create_comment_public(tenant_id, url_id, broadcast_id, comment_data, opts) +> create_comment_public(tenant_id, url_id, broadcast_id, comment_data, opts) @@ -214,7 +231,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> create_comment_public_with_http_info(tenant_id, url_id, broadcast_id, comment_data, opts) +> , Integer, Hash)> create_comment_public_with_http_info(tenant_id, url_id, broadcast_id, comment_data, opts) ```ruby begin @@ -222,7 +239,7 @@ begin data, status_code, headers = api_instance.create_comment_public_with_http_info(tenant_id, url_id, broadcast_id, comment_data, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->create_comment_public_with_http_info: #{e}" end @@ -241,7 +258,7 @@ end ### Return type -[**CreateCommentPublic200Response**](CreateCommentPublic200Response.md) +[**SaveCommentsResponseWithPresence**](SaveCommentsResponseWithPresence.md) ### Authorization @@ -255,7 +272,7 @@ No authorization required ## create_feed_post_public -> create_feed_post_public(tenant_id, create_feed_post_params, opts) +> create_feed_post_public(tenant_id, create_feed_post_params, opts) @@ -286,7 +303,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> create_feed_post_public_with_http_info(tenant_id, create_feed_post_params, opts) +> , Integer, Hash)> create_feed_post_public_with_http_info(tenant_id, create_feed_post_params, opts) ```ruby begin @@ -294,7 +311,7 @@ begin data, status_code, headers = api_instance.create_feed_post_public_with_http_info(tenant_id, create_feed_post_params, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->create_feed_post_public_with_http_info: #{e}" end @@ -311,7 +328,7 @@ end ### Return type -[**CreateFeedPostPublic200Response**](CreateFeedPostPublic200Response.md) +[**CreateFeedPostResponse**](CreateFeedPostResponse.md) ### Authorization @@ -323,9 +340,9 @@ No authorization required - **Accept**: application/json -## delete_comment_public +## create_v1_page_react -> delete_comment_public(tenant_id, comment_id, broadcast_id, opts) +> create_v1_page_react(tenant_id, url_id, opts) @@ -337,37 +354,35 @@ require 'fastcomments-client' api_instance = FastCommentsClient::PublicApi.new tenant_id = 'tenant_id_example' # String | -comment_id = 'comment_id_example' # String | -broadcast_id = 'broadcast_id_example' # String | +url_id = 'url_id_example' # String | opts = { - edit_key: 'edit_key_example', # String | - sso: 'sso_example' # String | + title: 'title_example' # String | } begin - result = api_instance.delete_comment_public(tenant_id, comment_id, broadcast_id, opts) + result = api_instance.create_v1_page_react(tenant_id, url_id, opts) p result rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->delete_comment_public: #{e}" + puts "Error when calling PublicApi->create_v1_page_react: #{e}" end ``` -#### Using the delete_comment_public_with_http_info variant +#### Using the create_v1_page_react_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_comment_public_with_http_info(tenant_id, comment_id, broadcast_id, opts) +> , Integer, Hash)> create_v1_page_react_with_http_info(tenant_id, url_id, opts) ```ruby begin - data, status_code, headers = api_instance.delete_comment_public_with_http_info(tenant_id, comment_id, broadcast_id, opts) + data, status_code, headers = api_instance.create_v1_page_react_with_http_info(tenant_id, url_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->delete_comment_public_with_http_info: #{e}" + puts "Error when calling PublicApi->create_v1_page_react_with_http_info: #{e}" end ``` @@ -376,14 +391,12 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **tenant_id** | **String** | | | -| **comment_id** | **String** | | | -| **broadcast_id** | **String** | | | -| **edit_key** | **String** | | [optional] | -| **sso** | **String** | | [optional] | +| **url_id** | **String** | | | +| **title** | **String** | | [optional] | ### Return type -[**DeleteCommentPublic200Response**](DeleteCommentPublic200Response.md) +[**CreateV1PageReact**](CreateV1PageReact.md) ### Authorization @@ -395,9 +408,9 @@ No authorization required - **Accept**: application/json -## delete_comment_vote +## create_v2_page_react -> delete_comment_vote(tenant_id, comment_id, vote_id, url_id, broadcast_id, opts) +> create_v2_page_react(tenant_id, url_id, id, opts) @@ -409,39 +422,36 @@ require 'fastcomments-client' api_instance = FastCommentsClient::PublicApi.new tenant_id = 'tenant_id_example' # String | -comment_id = 'comment_id_example' # String | -vote_id = 'vote_id_example' # String | url_id = 'url_id_example' # String | -broadcast_id = 'broadcast_id_example' # String | +id = 'id_example' # String | opts = { - edit_key: 'edit_key_example', # String | - sso: 'sso_example' # String | + title: 'title_example' # String | } begin - result = api_instance.delete_comment_vote(tenant_id, comment_id, vote_id, url_id, broadcast_id, opts) + result = api_instance.create_v2_page_react(tenant_id, url_id, id, opts) p result rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->delete_comment_vote: #{e}" + puts "Error when calling PublicApi->create_v2_page_react: #{e}" end ``` -#### Using the delete_comment_vote_with_http_info variant +#### Using the create_v2_page_react_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_comment_vote_with_http_info(tenant_id, comment_id, vote_id, url_id, broadcast_id, opts) +> , Integer, Hash)> create_v2_page_react_with_http_info(tenant_id, url_id, id, opts) ```ruby begin - data, status_code, headers = api_instance.delete_comment_vote_with_http_info(tenant_id, comment_id, vote_id, url_id, broadcast_id, opts) + data, status_code, headers = api_instance.create_v2_page_react_with_http_info(tenant_id, url_id, id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->delete_comment_vote_with_http_info: #{e}" + puts "Error when calling PublicApi->create_v2_page_react_with_http_info: #{e}" end ``` @@ -450,16 +460,13 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **tenant_id** | **String** | | | -| **comment_id** | **String** | | | -| **vote_id** | **String** | | | | **url_id** | **String** | | | -| **broadcast_id** | **String** | | | -| **edit_key** | **String** | | [optional] | -| **sso** | **String** | | [optional] | +| **id** | **String** | | | +| **title** | **String** | | [optional] | ### Return type -[**DeleteCommentVote200Response**](DeleteCommentVote200Response.md) +[**CreateV1PageReact**](CreateV1PageReact.md) ### Authorization @@ -471,9 +478,9 @@ No authorization required - **Accept**: application/json -## delete_feed_post_public +## delete_comment_public -> delete_feed_post_public(tenant_id, post_id, opts) +> delete_comment_public(tenant_id, comment_id, broadcast_id, opts) @@ -485,36 +492,37 @@ require 'fastcomments-client' api_instance = FastCommentsClient::PublicApi.new tenant_id = 'tenant_id_example' # String | -post_id = 'post_id_example' # String | +comment_id = 'comment_id_example' # String | +broadcast_id = 'broadcast_id_example' # String | opts = { - broadcast_id: 'broadcast_id_example', # String | + edit_key: 'edit_key_example', # String | sso: 'sso_example' # String | } begin - result = api_instance.delete_feed_post_public(tenant_id, post_id, opts) + result = api_instance.delete_comment_public(tenant_id, comment_id, broadcast_id, opts) p result rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->delete_feed_post_public: #{e}" + puts "Error when calling PublicApi->delete_comment_public: #{e}" end ``` -#### Using the delete_feed_post_public_with_http_info variant +#### Using the delete_comment_public_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_feed_post_public_with_http_info(tenant_id, post_id, opts) +> , Integer, Hash)> delete_comment_public_with_http_info(tenant_id, comment_id, broadcast_id, opts) ```ruby begin - data, status_code, headers = api_instance.delete_feed_post_public_with_http_info(tenant_id, post_id, opts) + data, status_code, headers = api_instance.delete_comment_public_with_http_info(tenant_id, comment_id, broadcast_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->delete_feed_post_public_with_http_info: #{e}" + puts "Error when calling PublicApi->delete_comment_public_with_http_info: #{e}" end ``` @@ -523,13 +531,14 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **tenant_id** | **String** | | | -| **post_id** | **String** | | | -| **broadcast_id** | **String** | | [optional] | +| **comment_id** | **String** | | | +| **broadcast_id** | **String** | | | +| **edit_key** | **String** | | [optional] | | **sso** | **String** | | [optional] | ### Return type -[**DeleteFeedPostPublic200Response**](DeleteFeedPostPublic200Response.md) +[**PublicAPIDeleteCommentResponse**](PublicAPIDeleteCommentResponse.md) ### Authorization @@ -541,9 +550,9 @@ No authorization required - **Accept**: application/json -## flag_comment_public +## delete_comment_vote -> flag_comment_public(tenant_id, comment_id, is_flagged, opts) +> delete_comment_vote(tenant_id, comment_id, vote_id, url_id, broadcast_id, opts) @@ -556,35 +565,38 @@ require 'fastcomments-client' api_instance = FastCommentsClient::PublicApi.new tenant_id = 'tenant_id_example' # String | comment_id = 'comment_id_example' # String | -is_flagged = true # Boolean | +vote_id = 'vote_id_example' # String | +url_id = 'url_id_example' # String | +broadcast_id = 'broadcast_id_example' # String | opts = { + edit_key: 'edit_key_example', # String | sso: 'sso_example' # String | } begin - result = api_instance.flag_comment_public(tenant_id, comment_id, is_flagged, opts) + result = api_instance.delete_comment_vote(tenant_id, comment_id, vote_id, url_id, broadcast_id, opts) p result rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->flag_comment_public: #{e}" + puts "Error when calling PublicApi->delete_comment_vote: #{e}" end ``` -#### Using the flag_comment_public_with_http_info variant +#### Using the delete_comment_vote_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> flag_comment_public_with_http_info(tenant_id, comment_id, is_flagged, opts) +> , Integer, Hash)> delete_comment_vote_with_http_info(tenant_id, comment_id, vote_id, url_id, broadcast_id, opts) ```ruby begin - data, status_code, headers = api_instance.flag_comment_public_with_http_info(tenant_id, comment_id, is_flagged, opts) + data, status_code, headers = api_instance.delete_comment_vote_with_http_info(tenant_id, comment_id, vote_id, url_id, broadcast_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->flag_comment_public_with_http_info: #{e}" + puts "Error when calling PublicApi->delete_comment_vote_with_http_info: #{e}" end ``` @@ -594,12 +606,15 @@ end | ---- | ---- | ----------- | ----- | | **tenant_id** | **String** | | | | **comment_id** | **String** | | | -| **is_flagged** | **Boolean** | | | +| **vote_id** | **String** | | | +| **url_id** | **String** | | | +| **broadcast_id** | **String** | | | +| **edit_key** | **String** | | [optional] | | **sso** | **String** | | [optional] | ### Return type -[**FlagCommentPublic200Response**](FlagCommentPublic200Response.md) +[**VoteDeleteResponse**](VoteDeleteResponse.md) ### Authorization @@ -611,9 +626,9 @@ No authorization required - **Accept**: application/json -## get_comment_text +## delete_feed_post_public -> get_comment_text(tenant_id, comment_id, opts) +> delete_feed_post_public(tenant_id, post_id, opts) @@ -625,36 +640,36 @@ require 'fastcomments-client' api_instance = FastCommentsClient::PublicApi.new tenant_id = 'tenant_id_example' # String | -comment_id = 'comment_id_example' # String | +post_id = 'post_id_example' # String | opts = { - edit_key: 'edit_key_example', # String | + broadcast_id: 'broadcast_id_example', # String | sso: 'sso_example' # String | } begin - result = api_instance.get_comment_text(tenant_id, comment_id, opts) + result = api_instance.delete_feed_post_public(tenant_id, post_id, opts) p result rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_comment_text: #{e}" + puts "Error when calling PublicApi->delete_feed_post_public: #{e}" end ``` -#### Using the get_comment_text_with_http_info variant +#### Using the delete_feed_post_public_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_comment_text_with_http_info(tenant_id, comment_id, opts) +> , Integer, Hash)> delete_feed_post_public_with_http_info(tenant_id, post_id, opts) ```ruby begin - data, status_code, headers = api_instance.get_comment_text_with_http_info(tenant_id, comment_id, opts) + data, status_code, headers = api_instance.delete_feed_post_public_with_http_info(tenant_id, post_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_comment_text_with_http_info: #{e}" + puts "Error when calling PublicApi->delete_feed_post_public_with_http_info: #{e}" end ``` @@ -663,13 +678,13 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **tenant_id** | **String** | | | -| **comment_id** | **String** | | | -| **edit_key** | **String** | | [optional] | +| **post_id** | **String** | | | +| **broadcast_id** | **String** | | [optional] | | **sso** | **String** | | [optional] | ### Return type -[**GetCommentText200Response**](GetCommentText200Response.md) +[**DeleteFeedPostPublicResponse**](DeleteFeedPostPublicResponse.md) ### Authorization @@ -681,9 +696,9 @@ No authorization required - **Accept**: application/json -## get_comment_vote_user_names +## delete_v1_page_react -> get_comment_vote_user_names(tenant_id, comment_id, dir, opts) +> delete_v1_page_react(tenant_id, url_id) @@ -695,36 +710,32 @@ require 'fastcomments-client' api_instance = FastCommentsClient::PublicApi.new tenant_id = 'tenant_id_example' # String | -comment_id = 'comment_id_example' # String | -dir = 56 # Integer | -opts = { - sso: 'sso_example' # String | -} +url_id = 'url_id_example' # String | begin - result = api_instance.get_comment_vote_user_names(tenant_id, comment_id, dir, opts) + result = api_instance.delete_v1_page_react(tenant_id, url_id) p result rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_comment_vote_user_names: #{e}" + puts "Error when calling PublicApi->delete_v1_page_react: #{e}" end ``` -#### Using the get_comment_vote_user_names_with_http_info variant +#### Using the delete_v1_page_react_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_comment_vote_user_names_with_http_info(tenant_id, comment_id, dir, opts) +> , Integer, Hash)> delete_v1_page_react_with_http_info(tenant_id, url_id) ```ruby begin - data, status_code, headers = api_instance.get_comment_vote_user_names_with_http_info(tenant_id, comment_id, dir, opts) + data, status_code, headers = api_instance.delete_v1_page_react_with_http_info(tenant_id, url_id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_comment_vote_user_names_with_http_info: #{e}" + puts "Error when calling PublicApi->delete_v1_page_react_with_http_info: #{e}" end ``` @@ -733,13 +744,11 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **tenant_id** | **String** | | | -| **comment_id** | **String** | | | -| **dir** | **Integer** | | | -| **sso** | **String** | | [optional] | +| **url_id** | **String** | | | ### Return type -[**GetCommentVoteUserNames200Response**](GetCommentVoteUserNames200Response.md) +[**CreateV1PageReact**](CreateV1PageReact.md) ### Authorization @@ -751,13 +760,11 @@ No authorization required - **Accept**: application/json -## get_comments_public - -> get_comments_public(tenant_id, url_id, opts) +## delete_v2_page_react +> delete_v2_page_react(tenant_id, url_id, id) - req tenantId urlId ### Examples @@ -768,59 +775,32 @@ require 'fastcomments-client' api_instance = FastCommentsClient::PublicApi.new tenant_id = 'tenant_id_example' # String | url_id = 'url_id_example' # String | -opts = { - page: 56, # Integer | - direction: FastCommentsClient::SortDirections::OF, # SortDirections | - sso: 'sso_example', # String | - skip: 56, # Integer | - skip_children: 56, # Integer | - limit: 56, # Integer | - limit_children: 56, # Integer | - count_children: true, # Boolean | - fetch_page_for_comment_id: 'fetch_page_for_comment_id_example', # String | - include_config: true, # Boolean | - count_all: true, # Boolean | - includei10n: true, # Boolean | - locale: 'locale_example', # String | - modules: 'modules_example', # String | - is_crawler: true, # Boolean | - include_notification_count: true, # Boolean | - as_tree: true, # Boolean | - max_tree_depth: 56, # Integer | - use_full_translation_ids: true, # Boolean | - parent_id: 'parent_id_example', # String | - search_text: 'search_text_example', # String | - hash_tags: ['inner_example'], # Array | - user_id: 'user_id_example', # String | - custom_config_str: 'custom_config_str_example', # String | - after_comment_id: 'after_comment_id_example', # String | - before_comment_id: 'before_comment_id_example' # String | -} +id = 'id_example' # String | begin - result = api_instance.get_comments_public(tenant_id, url_id, opts) + result = api_instance.delete_v2_page_react(tenant_id, url_id, id) p result rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_comments_public: #{e}" + puts "Error when calling PublicApi->delete_v2_page_react: #{e}" end ``` -#### Using the get_comments_public_with_http_info variant +#### Using the delete_v2_page_react_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_comments_public_with_http_info(tenant_id, url_id, opts) +> , Integer, Hash)> delete_v2_page_react_with_http_info(tenant_id, url_id, id) ```ruby begin - data, status_code, headers = api_instance.get_comments_public_with_http_info(tenant_id, url_id, opts) + data, status_code, headers = api_instance.delete_v2_page_react_with_http_info(tenant_id, url_id, id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_comments_public_with_http_info: #{e}" + puts "Error when calling PublicApi->delete_v2_page_react_with_http_info: #{e}" end ``` @@ -830,36 +810,11 @@ end | ---- | ---- | ----------- | ----- | | **tenant_id** | **String** | | | | **url_id** | **String** | | | -| **page** | **Integer** | | [optional] | -| **direction** | [**SortDirections**](.md) | | [optional] | -| **sso** | **String** | | [optional] | -| **skip** | **Integer** | | [optional] | -| **skip_children** | **Integer** | | [optional] | -| **limit** | **Integer** | | [optional] | -| **limit_children** | **Integer** | | [optional] | -| **count_children** | **Boolean** | | [optional] | -| **fetch_page_for_comment_id** | **String** | | [optional] | -| **include_config** | **Boolean** | | [optional] | -| **count_all** | **Boolean** | | [optional] | -| **includei10n** | **Boolean** | | [optional] | -| **locale** | **String** | | [optional] | -| **modules** | **String** | | [optional] | -| **is_crawler** | **Boolean** | | [optional] | -| **include_notification_count** | **Boolean** | | [optional] | -| **as_tree** | **Boolean** | | [optional] | -| **max_tree_depth** | **Integer** | | [optional] | -| **use_full_translation_ids** | **Boolean** | | [optional] | -| **parent_id** | **String** | | [optional] | -| **search_text** | **String** | | [optional] | -| **hash_tags** | [**Array<String>**](String.md) | | [optional] | -| **user_id** | **String** | | [optional] | -| **custom_config_str** | **String** | | [optional] | -| **after_comment_id** | **String** | | [optional] | -| **before_comment_id** | **String** | | [optional] | +| **id** | **String** | | | ### Return type -[**GetCommentsPublic200Response**](GetCommentsPublic200Response.md) +[**CreateV1PageReact**](CreateV1PageReact.md) ### Authorization @@ -871,13 +826,11 @@ No authorization required - **Accept**: application/json -## get_event_log - -> get_event_log(tenant_id, url_id, user_id_ws, start_time, end_time) +## flag_comment_public +> flag_comment_public(tenant_id, comment_id, is_flagged, opts) - req tenantId urlId userIdWS ### Examples @@ -887,35 +840,36 @@ require 'fastcomments-client' api_instance = FastCommentsClient::PublicApi.new tenant_id = 'tenant_id_example' # String | -url_id = 'url_id_example' # String | -user_id_ws = 'user_id_ws_example' # String | -start_time = 789 # Integer | -end_time = 789 # Integer | +comment_id = 'comment_id_example' # String | +is_flagged = true # Boolean | +opts = { + sso: 'sso_example' # String | +} begin - result = api_instance.get_event_log(tenant_id, url_id, user_id_ws, start_time, end_time) + result = api_instance.flag_comment_public(tenant_id, comment_id, is_flagged, opts) p result rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_event_log: #{e}" + puts "Error when calling PublicApi->flag_comment_public: #{e}" end ``` -#### Using the get_event_log_with_http_info variant +#### Using the flag_comment_public_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, end_time) +> , Integer, Hash)> flag_comment_public_with_http_info(tenant_id, comment_id, is_flagged, opts) ```ruby begin - data, status_code, headers = api_instance.get_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, end_time) + data, status_code, headers = api_instance.flag_comment_public_with_http_info(tenant_id, comment_id, is_flagged, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_event_log_with_http_info: #{e}" + puts "Error when calling PublicApi->flag_comment_public_with_http_info: #{e}" end ``` @@ -924,14 +878,13 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **tenant_id** | **String** | | | -| **url_id** | **String** | | | -| **user_id_ws** | **String** | | | -| **start_time** | **Integer** | | | -| **end_time** | **Integer** | | | +| **comment_id** | **String** | | | +| **is_flagged** | **Boolean** | | | +| **sso** | **String** | | [optional] | ### Return type -[**GetEventLog200Response**](GetEventLog200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -943,13 +896,11 @@ No authorization required - **Accept**: application/json -## get_feed_posts_public - -> get_feed_posts_public(tenant_id, opts) +## get_comment_text +> get_comment_text(tenant_id, comment_id, opts) - req tenantId afterId ### Examples @@ -959,39 +910,36 @@ require 'fastcomments-client' api_instance = FastCommentsClient::PublicApi.new tenant_id = 'tenant_id_example' # String | +comment_id = 'comment_id_example' # String | opts = { - after_id: 'after_id_example', # String | - limit: 56, # Integer | - tags: ['inner_example'], # Array | - sso: 'sso_example', # String | - is_crawler: true, # Boolean | - include_user_info: true # Boolean | + edit_key: 'edit_key_example', # String | + sso: 'sso_example' # String | } begin - result = api_instance.get_feed_posts_public(tenant_id, opts) + result = api_instance.get_comment_text(tenant_id, comment_id, opts) p result rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_feed_posts_public: #{e}" + puts "Error when calling PublicApi->get_comment_text: #{e}" end ``` -#### Using the get_feed_posts_public_with_http_info variant +#### Using the get_comment_text_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_feed_posts_public_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_comment_text_with_http_info(tenant_id, comment_id, opts) ```ruby begin - data, status_code, headers = api_instance.get_feed_posts_public_with_http_info(tenant_id, opts) + data, status_code, headers = api_instance.get_comment_text_with_http_info(tenant_id, comment_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_feed_posts_public_with_http_info: #{e}" + puts "Error when calling PublicApi->get_comment_text_with_http_info: #{e}" end ``` @@ -1000,16 +948,13 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **tenant_id** | **String** | | | -| **after_id** | **String** | | [optional] | -| **limit** | **Integer** | | [optional] | -| **tags** | [**Array<String>**](String.md) | | [optional] | +| **comment_id** | **String** | | | +| **edit_key** | **String** | | [optional] | | **sso** | **String** | | [optional] | -| **is_crawler** | **Boolean** | | [optional] | -| **include_user_info** | **Boolean** | | [optional] | ### Return type -[**GetFeedPostsPublic200Response**](GetFeedPostsPublic200Response.md) +[**PublicAPIGetCommentTextResponse**](PublicAPIGetCommentTextResponse.md) ### Authorization @@ -1021,9 +966,9 @@ No authorization required - **Accept**: application/json -## get_feed_posts_stats +## get_comment_vote_user_names -> get_feed_posts_stats(tenant_id, post_ids, opts) +> get_comment_vote_user_names(tenant_id, comment_id, dir, opts) @@ -1035,35 +980,36 @@ require 'fastcomments-client' api_instance = FastCommentsClient::PublicApi.new tenant_id = 'tenant_id_example' # String | -post_ids = ['inner_example'] # Array | +comment_id = 'comment_id_example' # String | +dir = 56 # Integer | opts = { sso: 'sso_example' # String | } begin - result = api_instance.get_feed_posts_stats(tenant_id, post_ids, opts) + result = api_instance.get_comment_vote_user_names(tenant_id, comment_id, dir, opts) p result rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_feed_posts_stats: #{e}" + puts "Error when calling PublicApi->get_comment_vote_user_names: #{e}" end ``` -#### Using the get_feed_posts_stats_with_http_info variant +#### Using the get_comment_vote_user_names_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_feed_posts_stats_with_http_info(tenant_id, post_ids, opts) +> , Integer, Hash)> get_comment_vote_user_names_with_http_info(tenant_id, comment_id, dir, opts) ```ruby begin - data, status_code, headers = api_instance.get_feed_posts_stats_with_http_info(tenant_id, post_ids, opts) + data, status_code, headers = api_instance.get_comment_vote_user_names_with_http_info(tenant_id, comment_id, dir, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_feed_posts_stats_with_http_info: #{e}" + puts "Error when calling PublicApi->get_comment_vote_user_names_with_http_info: #{e}" end ``` @@ -1072,12 +1018,13 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **tenant_id** | **String** | | | -| **post_ids** | [**Array<String>**](String.md) | | | +| **comment_id** | **String** | | | +| **dir** | **Integer** | | | | **sso** | **String** | | [optional] | ### Return type -[**GetFeedPostsStats200Response**](GetFeedPostsStats200Response.md) +[**GetCommentVoteUserNamesSuccessResponse**](GetCommentVoteUserNamesSuccessResponse.md) ### Authorization @@ -1089,13 +1036,11 @@ No authorization required - **Accept**: application/json -## get_global_event_log - -> get_global_event_log(tenant_id, url_id, user_id_ws, start_time, end_time) +## get_comments_for_user +> get_comments_for_user(opts) - req tenantId urlId userIdWS ### Examples @@ -1104,36 +1049,1097 @@ require 'time' require 'fastcomments-client' api_instance = FastCommentsClient::PublicApi.new -tenant_id = 'tenant_id_example' # String | -url_id = 'url_id_example' # String | -user_id_ws = 'user_id_ws_example' # String | -start_time = 789 # Integer | -end_time = 789 # Integer | - +opts = { + user_id: 'user_id_example', # String | + direction: FastCommentsClient::SortDirections::OF, # SortDirections | + replies_to_user_id: 'replies_to_user_id_example', # String | + page: 1.2, # Float | + includei10n: true, # Boolean | + locale: 'locale_example', # String | + is_crawler: true # Boolean | +} + +begin + + result = api_instance.get_comments_for_user(opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_comments_for_user: #{e}" +end +``` + +#### Using the get_comments_for_user_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_comments_for_user_with_http_info(opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_comments_for_user_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_comments_for_user_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_id** | **String** | | [optional] | +| **direction** | [**SortDirections**](.md) | | [optional] | +| **replies_to_user_id** | **String** | | [optional] | +| **page** | **Float** | | [optional] | +| **includei10n** | **Boolean** | | [optional] | +| **locale** | **String** | | [optional] | +| **is_crawler** | **Boolean** | | [optional] | + +### Return type + +[**GetCommentsForUserResponse**](GetCommentsForUserResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_comments_public + +> get_comments_public(tenant_id, url_id, opts) + + + + req tenantId urlId + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::PublicApi.new +tenant_id = 'tenant_id_example' # String | +url_id = 'url_id_example' # String | +opts = { + page: 56, # Integer | + direction: FastCommentsClient::SortDirections::OF, # SortDirections | + sso: 'sso_example', # String | + skip: 56, # Integer | + skip_children: 56, # Integer | + limit: 56, # Integer | + limit_children: 56, # Integer | + count_children: true, # Boolean | + fetch_page_for_comment_id: 'fetch_page_for_comment_id_example', # String | + include_config: true, # Boolean | + count_all: true, # Boolean | + includei10n: true, # Boolean | + locale: 'locale_example', # String | + modules: 'modules_example', # String | + is_crawler: true, # Boolean | + include_notification_count: true, # Boolean | + as_tree: true, # Boolean | + max_tree_depth: 56, # Integer | + use_full_translation_ids: true, # Boolean | + parent_id: 'parent_id_example', # String | + search_text: 'search_text_example', # String | + hash_tags: ['inner_example'], # Array | + user_id: 'user_id_example', # String | + custom_config_str: 'custom_config_str_example', # String | + after_comment_id: 'after_comment_id_example', # String | + before_comment_id: 'before_comment_id_example' # String | +} + +begin + + result = api_instance.get_comments_public(tenant_id, url_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_comments_public: #{e}" +end +``` + +#### Using the get_comments_public_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_comments_public_with_http_info(tenant_id, url_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_comments_public_with_http_info(tenant_id, url_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_comments_public_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tenant_id** | **String** | | | +| **url_id** | **String** | | | +| **page** | **Integer** | | [optional] | +| **direction** | [**SortDirections**](.md) | | [optional] | +| **sso** | **String** | | [optional] | +| **skip** | **Integer** | | [optional] | +| **skip_children** | **Integer** | | [optional] | +| **limit** | **Integer** | | [optional] | +| **limit_children** | **Integer** | | [optional] | +| **count_children** | **Boolean** | | [optional] | +| **fetch_page_for_comment_id** | **String** | | [optional] | +| **include_config** | **Boolean** | | [optional] | +| **count_all** | **Boolean** | | [optional] | +| **includei10n** | **Boolean** | | [optional] | +| **locale** | **String** | | [optional] | +| **modules** | **String** | | [optional] | +| **is_crawler** | **Boolean** | | [optional] | +| **include_notification_count** | **Boolean** | | [optional] | +| **as_tree** | **Boolean** | | [optional] | +| **max_tree_depth** | **Integer** | | [optional] | +| **use_full_translation_ids** | **Boolean** | | [optional] | +| **parent_id** | **String** | | [optional] | +| **search_text** | **String** | | [optional] | +| **hash_tags** | [**Array<String>**](String.md) | | [optional] | +| **user_id** | **String** | | [optional] | +| **custom_config_str** | **String** | | [optional] | +| **after_comment_id** | **String** | | [optional] | +| **before_comment_id** | **String** | | [optional] | + +### Return type + +[**GetCommentsResponseWithPresencePublicComment**](GetCommentsResponseWithPresencePublicComment.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_event_log + +> get_event_log(tenant_id, url_id, user_id_ws, start_time, opts) + + + + req tenantId urlId userIdWS + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::PublicApi.new +tenant_id = 'tenant_id_example' # String | +url_id = 'url_id_example' # String | +user_id_ws = 'user_id_ws_example' # String | +start_time = 789 # Integer | +opts = { + end_time: 789 # Integer | +} + +begin + + result = api_instance.get_event_log(tenant_id, url_id, user_id_ws, start_time, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_event_log: #{e}" +end +``` + +#### Using the get_event_log_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_event_log_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tenant_id** | **String** | | | +| **url_id** | **String** | | | +| **user_id_ws** | **String** | | | +| **start_time** | **Integer** | | | +| **end_time** | **Integer** | | [optional] | + +### Return type + +[**GetEventLogResponse**](GetEventLogResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_feed_posts_public + +> get_feed_posts_public(tenant_id, opts) + + + + req tenantId afterId + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::PublicApi.new +tenant_id = 'tenant_id_example' # String | +opts = { + after_id: 'after_id_example', # String | + limit: 56, # Integer | + tags: ['inner_example'], # Array | + sso: 'sso_example', # String | + is_crawler: true, # Boolean | + include_user_info: true # Boolean | +} + +begin + + result = api_instance.get_feed_posts_public(tenant_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_feed_posts_public: #{e}" +end +``` + +#### Using the get_feed_posts_public_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_feed_posts_public_with_http_info(tenant_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_feed_posts_public_with_http_info(tenant_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_feed_posts_public_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tenant_id** | **String** | | | +| **after_id** | **String** | | [optional] | +| **limit** | **Integer** | | [optional] | +| **tags** | [**Array<String>**](String.md) | | [optional] | +| **sso** | **String** | | [optional] | +| **is_crawler** | **Boolean** | | [optional] | +| **include_user_info** | **Boolean** | | [optional] | + +### Return type + +[**PublicFeedPostsResponse**](PublicFeedPostsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_feed_posts_stats + +> get_feed_posts_stats(tenant_id, post_ids, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::PublicApi.new +tenant_id = 'tenant_id_example' # String | +post_ids = ['inner_example'] # Array | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_feed_posts_stats(tenant_id, post_ids, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_feed_posts_stats: #{e}" +end +``` + +#### Using the get_feed_posts_stats_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_feed_posts_stats_with_http_info(tenant_id, post_ids, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_feed_posts_stats_with_http_info(tenant_id, post_ids, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_feed_posts_stats_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tenant_id** | **String** | | | +| **post_ids** | [**Array<String>**](String.md) | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**FeedPostsStatsResponse**](FeedPostsStatsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_gif_large + +> get_gif_large(tenant_id, large_internal_url_sanitized) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::PublicApi.new +tenant_id = 'tenant_id_example' # String | +large_internal_url_sanitized = 'large_internal_url_sanitized_example' # String | + +begin + + result = api_instance.get_gif_large(tenant_id, large_internal_url_sanitized) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_gif_large: #{e}" +end +``` + +#### Using the get_gif_large_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_gif_large_with_http_info(tenant_id, large_internal_url_sanitized) + +```ruby +begin + + data, status_code, headers = api_instance.get_gif_large_with_http_info(tenant_id, large_internal_url_sanitized) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_gif_large_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tenant_id** | **String** | | | +| **large_internal_url_sanitized** | **String** | | | + +### Return type + +[**GifGetLargeResponse**](GifGetLargeResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_gifs_search + +> get_gifs_search(tenant_id, search, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::PublicApi.new +tenant_id = 'tenant_id_example' # String | +search = 'search_example' # String | +opts = { + locale: 'locale_example', # String | + rating: 'rating_example', # String | + page: 1.2 # Float | +} + +begin + + result = api_instance.get_gifs_search(tenant_id, search, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_gifs_search: #{e}" +end +``` + +#### Using the get_gifs_search_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_gifs_search_with_http_info(tenant_id, search, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_gifs_search_with_http_info(tenant_id, search, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_gifs_search_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tenant_id** | **String** | | | +| **search** | **String** | | | +| **locale** | **String** | | [optional] | +| **rating** | **String** | | [optional] | +| **page** | **Float** | | [optional] | + +### Return type + +[**GetGifsSearchResponse**](GetGifsSearchResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_gifs_trending + +> get_gifs_trending(tenant_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::PublicApi.new +tenant_id = 'tenant_id_example' # String | +opts = { + locale: 'locale_example', # String | + rating: 'rating_example', # String | + page: 1.2 # Float | +} + +begin + + result = api_instance.get_gifs_trending(tenant_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_gifs_trending: #{e}" +end +``` + +#### Using the get_gifs_trending_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_gifs_trending_with_http_info(tenant_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_gifs_trending_with_http_info(tenant_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_gifs_trending_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tenant_id** | **String** | | | +| **locale** | **String** | | [optional] | +| **rating** | **String** | | [optional] | +| **page** | **Float** | | [optional] | + +### Return type + +[**GetGifsTrendingResponse**](GetGifsTrendingResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_global_event_log + +> get_global_event_log(tenant_id, url_id, user_id_ws, start_time, opts) + + + + req tenantId urlId userIdWS + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::PublicApi.new +tenant_id = 'tenant_id_example' # String | +url_id = 'url_id_example' # String | +user_id_ws = 'user_id_ws_example' # String | +start_time = 789 # Integer | +opts = { + end_time: 789 # Integer | +} + +begin + + result = api_instance.get_global_event_log(tenant_id, url_id, user_id_ws, start_time, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_global_event_log: #{e}" +end +``` + +#### Using the get_global_event_log_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_global_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_global_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_global_event_log_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tenant_id** | **String** | | | +| **url_id** | **String** | | | +| **user_id_ws** | **String** | | | +| **start_time** | **Integer** | | | +| **end_time** | **Integer** | | [optional] | + +### Return type + +[**GetEventLogResponse**](GetEventLogResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_offline_users + +> get_offline_users(tenant_id, url_id, opts) + + + +Past commenters on the page who are NOT currently online. Sorted by displayName. Use this after exhausting /users/online to render a \"Members\" section. Cursor pagination on commenterName: server walks the partial {tenantId, urlId, commenterName} index from afterName forward via $gt, no $skip cost. + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::PublicApi.new +tenant_id = 'tenant_id_example' # String | +url_id = 'url_id_example' # String | Page URL identifier (cleaned server-side). +opts = { + after_name: 'after_name_example', # String | Cursor: pass nextAfterName from the previous response. + after_user_id: 'after_user_id_example' # String | Cursor tiebreaker: pass nextAfterUserId from the previous response. Required when afterName is set so name-ties don't drop entries. +} + +begin + + result = api_instance.get_offline_users(tenant_id, url_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_offline_users: #{e}" +end +``` + +#### Using the get_offline_users_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_offline_users_with_http_info(tenant_id, url_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_offline_users_with_http_info(tenant_id, url_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_offline_users_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tenant_id** | **String** | | | +| **url_id** | **String** | Page URL identifier (cleaned server-side). | | +| **after_name** | **String** | Cursor: pass nextAfterName from the previous response. | [optional] | +| **after_user_id** | **String** | Cursor tiebreaker: pass nextAfterUserId from the previous response. Required when afterName is set so name-ties don't drop entries. | [optional] | + +### Return type + +[**PageUsersOfflineResponse**](PageUsersOfflineResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_online_users + +> get_online_users(tenant_id, url_id, opts) + + + +Currently-online viewers of a page: people whose websocket session is subscribed to the page right now. Returns anonCount + totalCount (room-wide subscribers, including anon viewers we don't enumerate). + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::PublicApi.new +tenant_id = 'tenant_id_example' # String | +url_id = 'url_id_example' # String | Page URL identifier (cleaned server-side). +opts = { + after_name: 'after_name_example', # String | Cursor: pass nextAfterName from the previous response. + after_user_id: 'after_user_id_example' # String | Cursor tiebreaker: pass nextAfterUserId from the previous response. Required when afterName is set so name-ties don't drop entries. +} + +begin + + result = api_instance.get_online_users(tenant_id, url_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_online_users: #{e}" +end +``` + +#### Using the get_online_users_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_online_users_with_http_info(tenant_id, url_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_online_users_with_http_info(tenant_id, url_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_online_users_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tenant_id** | **String** | | | +| **url_id** | **String** | Page URL identifier (cleaned server-side). | | +| **after_name** | **String** | Cursor: pass nextAfterName from the previous response. | [optional] | +| **after_user_id** | **String** | Cursor tiebreaker: pass nextAfterUserId from the previous response. Required when afterName is set so name-ties don't drop entries. | [optional] | + +### Return type + +[**PageUsersOnlineResponse**](PageUsersOnlineResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_pages_public + +> get_pages_public(tenant_id, opts) + + + +List pages for a tenant. Used by the FChat desktop client to populate its room list. Requires `enableFChat` to be true on the resolved custom config for each page. Pages that require SSO are filtered against the requesting user's group access. + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::PublicApi.new +tenant_id = 'tenant_id_example' # String | +opts = { + cursor: 'cursor_example', # String | Opaque pagination cursor returned as `nextCursor` from a prior request. Tied to the same `sortBy`. + limit: 56, # Integer | 1..200, default 50 + q: 'q_example', # String | Optional case-insensitive title prefix filter. + sort_by: FastCommentsClient::PagesSortBy::UPDATED_AT, # PagesSortBy | Sort order. `updatedAt` (default, newest first), `commentCount` (most comments first), or `title` (alphabetical). + has_comments: true # Boolean | If true, only return pages with at least one comment. +} + +begin + + result = api_instance.get_pages_public(tenant_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_pages_public: #{e}" +end +``` + +#### Using the get_pages_public_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_pages_public_with_http_info(tenant_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_pages_public_with_http_info(tenant_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_pages_public_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tenant_id** | **String** | | | +| **cursor** | **String** | Opaque pagination cursor returned as `nextCursor` from a prior request. Tied to the same `sortBy`. | [optional] | +| **limit** | **Integer** | 1..200, default 50 | [optional] | +| **q** | **String** | Optional case-insensitive title prefix filter. | [optional] | +| **sort_by** | [**PagesSortBy**](.md) | Sort order. `updatedAt` (default, newest first), `commentCount` (most comments first), or `title` (alphabetical). | [optional] | +| **has_comments** | **Boolean** | If true, only return pages with at least one comment. | [optional] | + +### Return type + +[**GetPublicPagesResponse**](GetPublicPagesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_translations + +> get_translations(namespace, component, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::PublicApi.new +namespace = 'namespace_example' # String | +component = 'component_example' # String | +opts = { + locale: 'locale_example', # String | + use_full_translation_ids: true # Boolean | +} + +begin + + result = api_instance.get_translations(namespace, component, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_translations: #{e}" +end +``` + +#### Using the get_translations_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_translations_with_http_info(namespace, component, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_translations_with_http_info(namespace, component, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_translations_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **namespace** | **String** | | | +| **component** | **String** | | | +| **locale** | **String** | | [optional] | +| **use_full_translation_ids** | **Boolean** | | [optional] | + +### Return type + +[**GetTranslationsResponse**](GetTranslationsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_user_notification_count + +> get_user_notification_count(tenant_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::PublicApi.new +tenant_id = 'tenant_id_example' # String | +opts = { + sso: 'sso_example' # String | +} + +begin + + result = api_instance.get_user_notification_count(tenant_id, opts) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_user_notification_count: #{e}" +end +``` + +#### Using the get_user_notification_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_user_notification_count_with_http_info(tenant_id, opts) + +```ruby +begin + + data, status_code, headers = api_instance.get_user_notification_count_with_http_info(tenant_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_user_notification_count_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tenant_id** | **String** | | | +| **sso** | **String** | | [optional] | + +### Return type + +[**GetUserNotificationCountResponse**](GetUserNotificationCountResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_user_notifications + +> get_user_notifications(tenant_id, opts) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::PublicApi.new +tenant_id = 'tenant_id_example' # String | +opts = { + url_id: 'url_id_example', # String | Used to determine whether the current page is subscribed. + page_size: 56, # Integer | + after_id: 'after_id_example', # String | + include_context: true, # Boolean | + after_created_at: 789, # Integer | + unread_only: true, # Boolean | + dm_only: true, # Boolean | + no_dm: true, # Boolean | + include_translations: true, # Boolean | + include_tenant_notifications: true, # Boolean | + sso: 'sso_example' # String | +} + begin - result = api_instance.get_global_event_log(tenant_id, url_id, user_id_ws, start_time, end_time) + result = api_instance.get_user_notifications(tenant_id, opts) p result rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_global_event_log: #{e}" + puts "Error when calling PublicApi->get_user_notifications: #{e}" end ``` -#### Using the get_global_event_log_with_http_info variant +#### Using the get_user_notifications_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_global_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, end_time) +> , Integer, Hash)> get_user_notifications_with_http_info(tenant_id, opts) ```ruby begin - data, status_code, headers = api_instance.get_global_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, end_time) + data, status_code, headers = api_instance.get_user_notifications_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_global_event_log_with_http_info: #{e}" + puts "Error when calling PublicApi->get_user_notifications_with_http_info: #{e}" end ``` @@ -1142,14 +2148,21 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **tenant_id** | **String** | | | -| **url_id** | **String** | | | -| **user_id_ws** | **String** | | | -| **start_time** | **Integer** | | | -| **end_time** | **Integer** | | | +| **url_id** | **String** | Used to determine whether the current page is subscribed. | [optional] | +| **page_size** | **Integer** | | [optional] | +| **after_id** | **String** | | [optional] | +| **include_context** | **Boolean** | | [optional] | +| **after_created_at** | **Integer** | | [optional] | +| **unread_only** | **Boolean** | | [optional] | +| **dm_only** | **Boolean** | | [optional] | +| **no_dm** | **Boolean** | | [optional] | +| **include_translations** | **Boolean** | | [optional] | +| **include_tenant_notifications** | **Boolean** | | [optional] | +| **sso** | **String** | | [optional] | ### Return type -[**GetEventLog200Response**](GetEventLog200Response.md) +[**GetMyNotificationsResponse**](GetMyNotificationsResponse.md) ### Authorization @@ -1161,9 +2174,9 @@ No authorization required - **Accept**: application/json -## get_user_notification_count +## get_user_presence_statuses -> get_user_notification_count(tenant_id, opts) +> get_user_presence_statuses(tenant_id, url_id_ws, user_ids) @@ -1175,34 +2188,33 @@ require 'fastcomments-client' api_instance = FastCommentsClient::PublicApi.new tenant_id = 'tenant_id_example' # String | -opts = { - sso: 'sso_example' # String | -} +url_id_ws = 'url_id_ws_example' # String | +user_ids = 'user_ids_example' # String | begin - result = api_instance.get_user_notification_count(tenant_id, opts) + result = api_instance.get_user_presence_statuses(tenant_id, url_id_ws, user_ids) p result rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_user_notification_count: #{e}" + puts "Error when calling PublicApi->get_user_presence_statuses: #{e}" end ``` -#### Using the get_user_notification_count_with_http_info variant +#### Using the get_user_presence_statuses_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_user_notification_count_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_user_presence_statuses_with_http_info(tenant_id, url_id_ws, user_ids) ```ruby begin - data, status_code, headers = api_instance.get_user_notification_count_with_http_info(tenant_id, opts) + data, status_code, headers = api_instance.get_user_presence_statuses_with_http_info(tenant_id, url_id_ws, user_ids) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_user_notification_count_with_http_info: #{e}" + puts "Error when calling PublicApi->get_user_presence_statuses_with_http_info: #{e}" end ``` @@ -1211,11 +2223,12 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **tenant_id** | **String** | | | -| **sso** | **String** | | [optional] | +| **url_id_ws** | **String** | | | +| **user_ids** | **String** | | | ### Return type -[**GetUserNotificationCount200Response**](GetUserNotificationCount200Response.md) +[**GetUserPresenceStatusesResponse**](GetUserPresenceStatusesResponse.md) ### Authorization @@ -1227,9 +2240,9 @@ No authorization required - **Accept**: application/json -## get_user_notifications +## get_user_reacts_public -> get_user_notifications(tenant_id, opts) +> get_user_reacts_public(tenant_id, opts) @@ -1242,41 +2255,34 @@ require 'fastcomments-client' api_instance = FastCommentsClient::PublicApi.new tenant_id = 'tenant_id_example' # String | opts = { - page_size: 56, # Integer | - after_id: 'after_id_example', # String | - include_context: true, # Boolean | - after_created_at: 789, # Integer | - unread_only: true, # Boolean | - dm_only: true, # Boolean | - no_dm: true, # Boolean | - include_translations: true, # Boolean | + post_ids: ['inner_example'], # Array | sso: 'sso_example' # String | } begin - result = api_instance.get_user_notifications(tenant_id, opts) + result = api_instance.get_user_reacts_public(tenant_id, opts) p result rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_user_notifications: #{e}" + puts "Error when calling PublicApi->get_user_reacts_public: #{e}" end ``` -#### Using the get_user_notifications_with_http_info variant +#### Using the get_user_reacts_public_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_user_notifications_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_user_reacts_public_with_http_info(tenant_id, opts) ```ruby begin - data, status_code, headers = api_instance.get_user_notifications_with_http_info(tenant_id, opts) + data, status_code, headers = api_instance.get_user_reacts_public_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_user_notifications_with_http_info: #{e}" + puts "Error when calling PublicApi->get_user_reacts_public_with_http_info: #{e}" end ``` @@ -1285,19 +2291,12 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **tenant_id** | **String** | | | -| **page_size** | **Integer** | | [optional] | -| **after_id** | **String** | | [optional] | -| **include_context** | **Boolean** | | [optional] | -| **after_created_at** | **Integer** | | [optional] | -| **unread_only** | **Boolean** | | [optional] | -| **dm_only** | **Boolean** | | [optional] | -| **no_dm** | **Boolean** | | [optional] | -| **include_translations** | **Boolean** | | [optional] | +| **post_ids** | [**Array<String>**](String.md) | | [optional] | | **sso** | **String** | | [optional] | ### Return type -[**GetUserNotifications200Response**](GetUserNotifications200Response.md) +[**UserReactsResponse**](UserReactsResponse.md) ### Authorization @@ -1309,12 +2308,14 @@ No authorization required - **Accept**: application/json -## get_user_presence_statuses +## get_users_info -> get_user_presence_statuses(tenant_id, url_id_ws, user_ids) +> get_users_info(tenant_id, ids) +Bulk user info for a tenant. Given userIds, return display info from User / SSOUser. Used by the comment widget to enrich users that just appeared via a presence event. No page context: privacy is enforced uniformly (private profiles are masked). + ### Examples ```ruby @@ -1323,33 +2324,32 @@ require 'fastcomments-client' api_instance = FastCommentsClient::PublicApi.new tenant_id = 'tenant_id_example' # String | -url_id_ws = 'url_id_ws_example' # String | -user_ids = 'user_ids_example' # String | +ids = 'ids_example' # String | Comma-delimited userIds. begin - result = api_instance.get_user_presence_statuses(tenant_id, url_id_ws, user_ids) + result = api_instance.get_users_info(tenant_id, ids) p result rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_user_presence_statuses: #{e}" + puts "Error when calling PublicApi->get_users_info: #{e}" end ``` -#### Using the get_user_presence_statuses_with_http_info variant +#### Using the get_users_info_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_user_presence_statuses_with_http_info(tenant_id, url_id_ws, user_ids) +> , Integer, Hash)> get_users_info_with_http_info(tenant_id, ids) ```ruby begin - data, status_code, headers = api_instance.get_user_presence_statuses_with_http_info(tenant_id, url_id_ws, user_ids) + data, status_code, headers = api_instance.get_users_info_with_http_info(tenant_id, ids) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_user_presence_statuses_with_http_info: #{e}" + puts "Error when calling PublicApi->get_users_info_with_http_info: #{e}" end ``` @@ -1358,12 +2358,11 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **tenant_id** | **String** | | | -| **url_id_ws** | **String** | | | -| **user_ids** | **String** | | | +| **ids** | **String** | Comma-delimited userIds. | | ### Return type -[**GetUserPresenceStatuses200Response**](GetUserPresenceStatuses200Response.md) +[**PageUsersInfoResponse**](PageUsersInfoResponse.md) ### Authorization @@ -1375,9 +2374,9 @@ No authorization required - **Accept**: application/json -## get_user_reacts_public +## get_v1_page_likes -> get_user_reacts_public(tenant_id, opts) +> get_v1_page_likes(tenant_id, url_id) @@ -1389,35 +2388,32 @@ require 'fastcomments-client' api_instance = FastCommentsClient::PublicApi.new tenant_id = 'tenant_id_example' # String | -opts = { - post_ids: ['inner_example'], # Array | - sso: 'sso_example' # String | -} +url_id = 'url_id_example' # String | begin - result = api_instance.get_user_reacts_public(tenant_id, opts) + result = api_instance.get_v1_page_likes(tenant_id, url_id) p result rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_user_reacts_public: #{e}" + puts "Error when calling PublicApi->get_v1_page_likes: #{e}" end ``` -#### Using the get_user_reacts_public_with_http_info variant +#### Using the get_v1_page_likes_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_user_reacts_public_with_http_info(tenant_id, opts) +> , Integer, Hash)> get_v1_page_likes_with_http_info(tenant_id, url_id) ```ruby begin - data, status_code, headers = api_instance.get_user_reacts_public_with_http_info(tenant_id, opts) + data, status_code, headers = api_instance.get_v1_page_likes_with_http_info(tenant_id, url_id) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e - puts "Error when calling PublicApi->get_user_reacts_public_with_http_info: #{e}" + puts "Error when calling PublicApi->get_v1_page_likes_with_http_info: #{e}" end ``` @@ -1426,12 +2422,141 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **tenant_id** | **String** | | | -| **post_ids** | [**Array<String>**](String.md) | | [optional] | -| **sso** | **String** | | [optional] | +| **url_id** | **String** | | | + +### Return type + +[**GetV1PageLikes**](GetV1PageLikes.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_v2_page_react_users + +> get_v2_page_react_users(tenant_id, url_id, id) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::PublicApi.new +tenant_id = 'tenant_id_example' # String | +url_id = 'url_id_example' # String | +id = 'id_example' # String | + +begin + + result = api_instance.get_v2_page_react_users(tenant_id, url_id, id) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_v2_page_react_users: #{e}" +end +``` + +#### Using the get_v2_page_react_users_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_v2_page_react_users_with_http_info(tenant_id, url_id, id) + +```ruby +begin + + data, status_code, headers = api_instance.get_v2_page_react_users_with_http_info(tenant_id, url_id, id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_v2_page_react_users_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tenant_id** | **String** | | | +| **url_id** | **String** | | | +| **id** | **String** | | | + +### Return type + +[**GetV2PageReactUsersResponse**](GetV2PageReactUsersResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_v2_page_reacts + +> get_v2_page_reacts(tenant_id, url_id) + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::PublicApi.new +tenant_id = 'tenant_id_example' # String | +url_id = 'url_id_example' # String | + +begin + + result = api_instance.get_v2_page_reacts(tenant_id, url_id) + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_v2_page_reacts: #{e}" +end +``` + +#### Using the get_v2_page_reacts_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_v2_page_reacts_with_http_info(tenant_id, url_id) + +```ruby +begin + + data, status_code, headers = api_instance.get_v2_page_reacts_with_http_info(tenant_id, url_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->get_v2_page_reacts_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tenant_id** | **String** | | | +| **url_id** | **String** | | | ### Return type -[**GetUserReactsPublic200Response**](GetUserReactsPublic200Response.md) +[**GetV2PageReacts**](GetV2PageReacts.md) ### Authorization @@ -1445,7 +2570,7 @@ No authorization required ## lock_comment -> lock_comment(tenant_id, comment_id, broadcast_id, opts) +> lock_comment(tenant_id, comment_id, broadcast_id, opts) @@ -1476,7 +2601,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> lock_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts) +> , Integer, Hash)> lock_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts) ```ruby begin @@ -1484,7 +2609,7 @@ begin data, status_code, headers = api_instance.lock_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->lock_comment_with_http_info: #{e}" end @@ -1501,7 +2626,66 @@ end ### Return type -[**LockComment200Response**](LockComment200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## logout_public + +> logout_public + + + +### Examples + +```ruby +require 'time' +require 'fastcomments-client' + +api_instance = FastCommentsClient::PublicApi.new + +begin + + result = api_instance.logout_public + p result +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->logout_public: #{e}" +end +``` + +#### Using the logout_public_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> logout_public_with_http_info + +```ruby +begin + + data, status_code, headers = api_instance.logout_public_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue FastCommentsClient::ApiError => e + puts "Error when calling PublicApi->logout_public_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -1515,7 +2699,7 @@ No authorization required ## pin_comment -> pin_comment(tenant_id, comment_id, broadcast_id, opts) +> pin_comment(tenant_id, comment_id, broadcast_id, opts) @@ -1546,7 +2730,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> pin_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts) +> , Integer, Hash)> pin_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts) ```ruby begin @@ -1554,7 +2738,7 @@ begin data, status_code, headers = api_instance.pin_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->pin_comment_with_http_info: #{e}" end @@ -1571,7 +2755,7 @@ end ### Return type -[**PinComment200Response**](PinComment200Response.md) +[**ChangeCommentPinStatusResponse**](ChangeCommentPinStatusResponse.md) ### Authorization @@ -1585,7 +2769,7 @@ No authorization required ## react_feed_post_public -> react_feed_post_public(tenant_id, post_id, react_body_params, opts) +> react_feed_post_public(tenant_id, post_id, react_body_params, opts) @@ -1618,7 +2802,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> react_feed_post_public_with_http_info(tenant_id, post_id, react_body_params, opts) +> , Integer, Hash)> react_feed_post_public_with_http_info(tenant_id, post_id, react_body_params, opts) ```ruby begin @@ -1626,7 +2810,7 @@ begin data, status_code, headers = api_instance.react_feed_post_public_with_http_info(tenant_id, post_id, react_body_params, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->react_feed_post_public_with_http_info: #{e}" end @@ -1645,7 +2829,7 @@ end ### Return type -[**ReactFeedPostPublic200Response**](ReactFeedPostPublic200Response.md) +[**ReactFeedPostResponse**](ReactFeedPostResponse.md) ### Authorization @@ -1659,7 +2843,7 @@ No authorization required ## reset_user_notification_count -> reset_user_notification_count(tenant_id, opts) +> reset_user_notification_count(tenant_id, opts) @@ -1688,7 +2872,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> reset_user_notification_count_with_http_info(tenant_id, opts) +> , Integer, Hash)> reset_user_notification_count_with_http_info(tenant_id, opts) ```ruby begin @@ -1696,7 +2880,7 @@ begin data, status_code, headers = api_instance.reset_user_notification_count_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->reset_user_notification_count_with_http_info: #{e}" end @@ -1711,7 +2895,7 @@ end ### Return type -[**ResetUserNotifications200Response**](ResetUserNotifications200Response.md) +[**ResetUserNotificationsResponse**](ResetUserNotificationsResponse.md) ### Authorization @@ -1725,7 +2909,7 @@ No authorization required ## reset_user_notifications -> reset_user_notifications(tenant_id, opts) +> reset_user_notifications(tenant_id, opts) @@ -1759,7 +2943,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> reset_user_notifications_with_http_info(tenant_id, opts) +> , Integer, Hash)> reset_user_notifications_with_http_info(tenant_id, opts) ```ruby begin @@ -1767,7 +2951,7 @@ begin data, status_code, headers = api_instance.reset_user_notifications_with_http_info(tenant_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->reset_user_notifications_with_http_info: #{e}" end @@ -1787,7 +2971,7 @@ end ### Return type -[**ResetUserNotifications200Response**](ResetUserNotifications200Response.md) +[**ResetUserNotificationsResponse**](ResetUserNotificationsResponse.md) ### Authorization @@ -1801,7 +2985,7 @@ No authorization required ## search_users -> search_users(tenant_id, url_id, opts) +> search_users(tenant_id, url_id, opts) @@ -1834,7 +3018,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> search_users_with_http_info(tenant_id, url_id, opts) +> , Integer, Hash)> search_users_with_http_info(tenant_id, url_id, opts) ```ruby begin @@ -1842,7 +3026,7 @@ begin data, status_code, headers = api_instance.search_users_with_http_info(tenant_id, url_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->search_users_with_http_info: #{e}" end @@ -1861,7 +3045,7 @@ end ### Return type -[**SearchUsers200Response**](SearchUsers200Response.md) +[**SearchUsersResult**](SearchUsersResult.md) ### Authorization @@ -1875,7 +3059,7 @@ No authorization required ## set_comment_text -> set_comment_text(tenant_id, comment_id, broadcast_id, comment_text_update_request, opts) +> set_comment_text(tenant_id, comment_id, broadcast_id, comment_text_update_request, opts) @@ -1908,7 +3092,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> set_comment_text_with_http_info(tenant_id, comment_id, broadcast_id, comment_text_update_request, opts) +> , Integer, Hash)> set_comment_text_with_http_info(tenant_id, comment_id, broadcast_id, comment_text_update_request, opts) ```ruby begin @@ -1916,7 +3100,7 @@ begin data, status_code, headers = api_instance.set_comment_text_with_http_info(tenant_id, comment_id, broadcast_id, comment_text_update_request, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->set_comment_text_with_http_info: #{e}" end @@ -1935,7 +3119,7 @@ end ### Return type -[**SetCommentText200Response**](SetCommentText200Response.md) +[**PublicAPISetCommentTextResponse**](PublicAPISetCommentTextResponse.md) ### Authorization @@ -1949,7 +3133,7 @@ No authorization required ## un_block_comment_public -> un_block_comment_public(tenant_id, comment_id, public_block_from_comment_params, opts) +> un_block_comment_public(tenant_id, comment_id, public_block_from_comment_params, opts) @@ -1980,7 +3164,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> un_block_comment_public_with_http_info(tenant_id, comment_id, public_block_from_comment_params, opts) +> , Integer, Hash)> un_block_comment_public_with_http_info(tenant_id, comment_id, public_block_from_comment_params, opts) ```ruby begin @@ -1988,7 +3172,7 @@ begin data, status_code, headers = api_instance.un_block_comment_public_with_http_info(tenant_id, comment_id, public_block_from_comment_params, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->un_block_comment_public_with_http_info: #{e}" end @@ -2005,7 +3189,7 @@ end ### Return type -[**UnBlockCommentPublic200Response**](UnBlockCommentPublic200Response.md) +[**UnblockSuccess**](UnblockSuccess.md) ### Authorization @@ -2019,7 +3203,7 @@ No authorization required ## un_lock_comment -> un_lock_comment(tenant_id, comment_id, broadcast_id, opts) +> un_lock_comment(tenant_id, comment_id, broadcast_id, opts) @@ -2050,7 +3234,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> un_lock_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts) +> , Integer, Hash)> un_lock_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts) ```ruby begin @@ -2058,7 +3242,7 @@ begin data, status_code, headers = api_instance.un_lock_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->un_lock_comment_with_http_info: #{e}" end @@ -2075,7 +3259,7 @@ end ### Return type -[**LockComment200Response**](LockComment200Response.md) +[**APIEmptyResponse**](APIEmptyResponse.md) ### Authorization @@ -2089,7 +3273,7 @@ No authorization required ## un_pin_comment -> un_pin_comment(tenant_id, comment_id, broadcast_id, opts) +> un_pin_comment(tenant_id, comment_id, broadcast_id, opts) @@ -2120,7 +3304,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> un_pin_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts) +> , Integer, Hash)> un_pin_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts) ```ruby begin @@ -2128,7 +3312,7 @@ begin data, status_code, headers = api_instance.un_pin_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->un_pin_comment_with_http_info: #{e}" end @@ -2145,7 +3329,7 @@ end ### Return type -[**PinComment200Response**](PinComment200Response.md) +[**ChangeCommentPinStatusResponse**](ChangeCommentPinStatusResponse.md) ### Authorization @@ -2159,7 +3343,7 @@ No authorization required ## update_feed_post_public -> update_feed_post_public(tenant_id, post_id, update_feed_post_params, opts) +> update_feed_post_public(tenant_id, post_id, update_feed_post_params, opts) @@ -2191,7 +3375,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_feed_post_public_with_http_info(tenant_id, post_id, update_feed_post_params, opts) +> , Integer, Hash)> update_feed_post_public_with_http_info(tenant_id, post_id, update_feed_post_params, opts) ```ruby begin @@ -2199,7 +3383,7 @@ begin data, status_code, headers = api_instance.update_feed_post_public_with_http_info(tenant_id, post_id, update_feed_post_params, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->update_feed_post_public_with_http_info: #{e}" end @@ -2217,7 +3401,7 @@ end ### Return type -[**CreateFeedPostPublic200Response**](CreateFeedPostPublic200Response.md) +[**CreateFeedPostResponse**](CreateFeedPostResponse.md) ### Authorization @@ -2231,7 +3415,7 @@ No authorization required ## update_user_notification_comment_subscription_status -> update_user_notification_comment_subscription_status(tenant_id, notification_id, opted_in_or_out, comment_id, opts) +> update_user_notification_comment_subscription_status(tenant_id, notification_id, opted_in_or_out, comment_id, opts) @@ -2265,7 +3449,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_user_notification_comment_subscription_status_with_http_info(tenant_id, notification_id, opted_in_or_out, comment_id, opts) +> , Integer, Hash)> update_user_notification_comment_subscription_status_with_http_info(tenant_id, notification_id, opted_in_or_out, comment_id, opts) ```ruby begin @@ -2273,7 +3457,7 @@ begin data, status_code, headers = api_instance.update_user_notification_comment_subscription_status_with_http_info(tenant_id, notification_id, opted_in_or_out, comment_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->update_user_notification_comment_subscription_status_with_http_info: #{e}" end @@ -2291,7 +3475,7 @@ end ### Return type -[**UpdateUserNotificationStatus200Response**](UpdateUserNotificationStatus200Response.md) +[**UpdateUserNotificationCommentSubscriptionStatusResponse**](UpdateUserNotificationCommentSubscriptionStatusResponse.md) ### Authorization @@ -2305,7 +3489,7 @@ No authorization required ## update_user_notification_page_subscription_status -> update_user_notification_page_subscription_status(tenant_id, url_id, url, page_title, subscribed_or_unsubscribed, opts) +> update_user_notification_page_subscription_status(tenant_id, url_id, url, page_title, subscribed_or_unsubscribed, opts) @@ -2340,7 +3524,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_user_notification_page_subscription_status_with_http_info(tenant_id, url_id, url, page_title, subscribed_or_unsubscribed, opts) +> , Integer, Hash)> update_user_notification_page_subscription_status_with_http_info(tenant_id, url_id, url, page_title, subscribed_or_unsubscribed, opts) ```ruby begin @@ -2348,7 +3532,7 @@ begin data, status_code, headers = api_instance.update_user_notification_page_subscription_status_with_http_info(tenant_id, url_id, url, page_title, subscribed_or_unsubscribed, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->update_user_notification_page_subscription_status_with_http_info: #{e}" end @@ -2367,7 +3551,7 @@ end ### Return type -[**UpdateUserNotificationStatus200Response**](UpdateUserNotificationStatus200Response.md) +[**UpdateUserNotificationPageSubscriptionStatusResponse**](UpdateUserNotificationPageSubscriptionStatusResponse.md) ### Authorization @@ -2381,7 +3565,7 @@ No authorization required ## update_user_notification_status -> update_user_notification_status(tenant_id, notification_id, new_status, opts) +> update_user_notification_status(tenant_id, notification_id, new_status, opts) @@ -2412,7 +3596,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_user_notification_status_with_http_info(tenant_id, notification_id, new_status, opts) +> , Integer, Hash)> update_user_notification_status_with_http_info(tenant_id, notification_id, new_status, opts) ```ruby begin @@ -2420,7 +3604,7 @@ begin data, status_code, headers = api_instance.update_user_notification_status_with_http_info(tenant_id, notification_id, new_status, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->update_user_notification_status_with_http_info: #{e}" end @@ -2437,7 +3621,7 @@ end ### Return type -[**UpdateUserNotificationStatus200Response**](UpdateUserNotificationStatus200Response.md) +[**UpdateUserNotificationStatusResponse**](UpdateUserNotificationStatusResponse.md) ### Authorization @@ -2523,7 +3707,7 @@ No authorization required ## vote_comment -> vote_comment(tenant_id, comment_id, url_id, broadcast_id, vote_body_params, opts) +> vote_comment(tenant_id, comment_id, url_id, broadcast_id, vote_body_params, opts) @@ -2557,7 +3741,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> vote_comment_with_http_info(tenant_id, comment_id, url_id, broadcast_id, vote_body_params, opts) +> , Integer, Hash)> vote_comment_with_http_info(tenant_id, comment_id, url_id, broadcast_id, vote_body_params, opts) ```ruby begin @@ -2565,7 +3749,7 @@ begin data, status_code, headers = api_instance.vote_comment_with_http_info(tenant_id, comment_id, url_id, broadcast_id, vote_body_params, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue FastCommentsClient::ApiError => e puts "Error when calling PublicApi->vote_comment_with_http_info: #{e}" end @@ -2585,7 +3769,7 @@ end ### Return type -[**VoteComment200Response**](VoteComment200Response.md) +[**VoteResponse**](VoteResponse.md) ### Authorization diff --git a/client/docs/PublicPage.md b/client/docs/PublicPage.md new file mode 100644 index 0000000..6c9ed4c --- /dev/null +++ b/client/docs/PublicPage.md @@ -0,0 +1,26 @@ +# FastCommentsClient::PublicPage + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **updated_at** | **Integer** | | | +| **comment_count** | **Integer** | | | +| **title** | **String** | | | +| **url** | **String** | | | +| **url_id** | **String** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::PublicPage.new( + updated_at: null, + comment_count: null, + title: null, + url: null, + url_id: null +) +``` + diff --git a/client/docs/PutDomainConfigResponse.md b/client/docs/PutDomainConfigResponse.md new file mode 100644 index 0000000..3e582eb --- /dev/null +++ b/client/docs/PutDomainConfigResponse.md @@ -0,0 +1,24 @@ +# FastCommentsClient::PutDomainConfigResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **configuration** | **Object** | | | +| **status** | **Object** | | | +| **reason** | **String** | | | +| **code** | **String** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::PutDomainConfigResponse.new( + configuration: null, + status: null, + reason: null, + code: null +) +``` + diff --git a/client/docs/ReactFeedPostPublic200Response.md b/client/docs/ReactFeedPostPublic200Response.md deleted file mode 100644 index 1b9c73a..0000000 --- a/client/docs/ReactFeedPostPublic200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# FastCommentsClient::ReactFeedPostPublic200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **react_type** | **String** | | | -| **is_undo** | **Boolean** | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::ReactFeedPostPublic200Response.new( - status: null, - react_type: null, - is_undo: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/RemoveCommentActionResponse.md b/client/docs/RemoveCommentActionResponse.md new file mode 100644 index 0000000..3861a4d --- /dev/null +++ b/client/docs/RemoveCommentActionResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::RemoveCommentActionResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | **String** | | | +| **action** | **String** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::RemoveCommentActionResponse.new( + status: null, + action: null +) +``` + diff --git a/client/docs/RemoveUserBadgeResponse.md b/client/docs/RemoveUserBadgeResponse.md new file mode 100644 index 0000000..a503f6a --- /dev/null +++ b/client/docs/RemoveUserBadgeResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::RemoveUserBadgeResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **badges** | [**Array<CommentUserBadgeInfo>**](CommentUserBadgeInfo.md) | | [optional] | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::RemoveUserBadgeResponse.new( + badges: null, + status: null +) +``` + diff --git a/client/docs/RenderEmailTemplate200Response.md b/client/docs/RenderEmailTemplate200Response.md deleted file mode 100644 index b244cdc..0000000 --- a/client/docs/RenderEmailTemplate200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::RenderEmailTemplate200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **html** | **String** | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::RenderEmailTemplate200Response.new( - status: null, - html: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/ResetUserNotifications200Response.md b/client/docs/ResetUserNotifications200Response.md deleted file mode 100644 index e950433..0000000 --- a/client/docs/ResetUserNotifications200Response.md +++ /dev/null @@ -1,32 +0,0 @@ -# FastCommentsClient::ResetUserNotifications200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **code** | **String** | | | -| **reason** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::ResetUserNotifications200Response.new( - status: null, - code: null, - reason: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/SaveComment200Response.md b/client/docs/SaveCommentsBulkResponse.md similarity index 85% rename from client/docs/SaveComment200Response.md rename to client/docs/SaveCommentsBulkResponse.md index e7a8aa8..0c1fae0 100644 --- a/client/docs/SaveComment200Response.md +++ b/client/docs/SaveCommentsBulkResponse.md @@ -1,11 +1,11 @@ -# FastCommentsClient::SaveComment200Response +# FastCommentsClient::SaveCommentsBulkResponse ## Properties | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **status** | [**APIStatus**](APIStatus.md) | | | -| **comment** | [**FComment**](FComment.md) | | | +| **comment** | [**APIComment**](APIComment.md) | | | | **user** | [**UserSessionInfo**](UserSessionInfo.md) | | | | **module_data** | **Hash<String, Object>** | Construct a type with a set of properties K of type T | [optional] | | **reason** | **String** | | | @@ -21,7 +21,7 @@ ```ruby require 'fastcomments-client' -instance = FastCommentsClient::SaveComment200Response.new( +instance = FastCommentsClient::SaveCommentsBulkResponse.new( status: null, comment: null, user: null, diff --git a/client/docs/SearchUsers200Response.md b/client/docs/SearchUsers200Response.md deleted file mode 100644 index 165201e..0000000 --- a/client/docs/SearchUsers200Response.md +++ /dev/null @@ -1,36 +0,0 @@ -# FastCommentsClient::SearchUsers200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **sections** | [**Array<UserSearchSectionResult>**](UserSearchSectionResult.md) | | | -| **users** | [**Array<UserSearchResult>**](UserSearchResult.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::SearchUsers200Response.new( - status: null, - sections: null, - users: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/SearchUsersResult.md b/client/docs/SearchUsersResult.md new file mode 100644 index 0000000..13bb5f7 --- /dev/null +++ b/client/docs/SearchUsersResult.md @@ -0,0 +1,22 @@ +# FastCommentsClient::SearchUsersResult + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | [**APIStatus**](APIStatus.md) | | | +| **sections** | [**Array<UserSearchSectionResult>**](UserSearchSectionResult.md) | | | +| **users** | [**Array<UserSearchResult>**](UserSearchResult.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::SearchUsersResult.new( + status: null, + sections: null, + users: null +) +``` + diff --git a/client/docs/SetCommentApprovedResponse.md b/client/docs/SetCommentApprovedResponse.md new file mode 100644 index 0000000..0b0d9d6 --- /dev/null +++ b/client/docs/SetCommentApprovedResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::SetCommentApprovedResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **did_reset_flagged_count** | **Boolean** | | [optional] | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::SetCommentApprovedResponse.new( + did_reset_flagged_count: null, + status: null +) +``` + diff --git a/client/docs/SetCommentText200Response.md b/client/docs/SetCommentText200Response.md deleted file mode 100644 index e6b7fa6..0000000 --- a/client/docs/SetCommentText200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::SetCommentText200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **comment** | [**SetCommentTextResult**](SetCommentTextResult.md) | | | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::SetCommentText200Response.new( - comment: null, - status: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/SetCommentTextParams.md b/client/docs/SetCommentTextParams.md new file mode 100644 index 0000000..1d72b3f --- /dev/null +++ b/client/docs/SetCommentTextParams.md @@ -0,0 +1,18 @@ +# FastCommentsClient::SetCommentTextParams + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment** | **String** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::SetCommentTextParams.new( + comment: null +) +``` + diff --git a/client/docs/SetCommentTextResponse.md b/client/docs/SetCommentTextResponse.md new file mode 100644 index 0000000..04e513d --- /dev/null +++ b/client/docs/SetCommentTextResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::SetCommentTextResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **new_comment_text_html** | **String** | | | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::SetCommentTextResponse.new( + new_comment_text_html: null, + status: null +) +``` + diff --git a/client/docs/SetUserTrustFactorResponse.md b/client/docs/SetUserTrustFactorResponse.md new file mode 100644 index 0000000..dd10b5a --- /dev/null +++ b/client/docs/SetUserTrustFactorResponse.md @@ -0,0 +1,20 @@ +# FastCommentsClient::SetUserTrustFactorResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **previous_manual_trust_factor** | **Float** | | [optional] | +| **status** | [**APIStatus**](APIStatus.md) | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::SetUserTrustFactorResponse.new( + previous_manual_trust_factor: null, + status: null +) +``` + diff --git a/client/docs/TenantBadge.md b/client/docs/TenantBadge.md new file mode 100644 index 0000000..dbcf09c --- /dev/null +++ b/client/docs/TenantBadge.md @@ -0,0 +1,58 @@ +# FastCommentsClient::TenantBadge + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **_id** | **String** | | | +| **tenant_id** | **String** | | | +| **created_by_user_id** | **String** | | | +| **created_at** | **Time** | | | +| **enabled** | **Boolean** | | | +| **url_id** | **String** | | [optional] | +| **type** | **Float** | | | +| **threshold** | **Float** | | | +| **uses** | **Float** | | | +| **name** | **String** | | | +| **description** | **String** | | | +| **display_label** | **String** | | | +| **display_src** | **String** | | | +| **background_color** | **String** | | | +| **border_color** | **String** | | | +| **text_color** | **String** | | | +| **css_class** | **String** | | [optional] | +| **veteran_user_threshold_millis** | **Float** | | [optional] | +| **is_awaiting_reprocess** | **Boolean** | | | +| **is_awaiting_deletion** | **Boolean** | | | +| **replaces_badge_id** | **String** | | [optional] | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::TenantBadge.new( + _id: null, + tenant_id: null, + created_by_user_id: null, + created_at: null, + enabled: null, + url_id: null, + type: null, + threshold: null, + uses: null, + name: null, + description: null, + display_label: null, + display_src: null, + background_color: null, + border_color: null, + text_color: null, + css_class: null, + veteran_user_threshold_millis: null, + is_awaiting_reprocess: null, + is_awaiting_deletion: null, + replaces_badge_id: null +) +``` + diff --git a/client/docs/TenantPackage.md b/client/docs/TenantPackage.md index 2e1c43d..a817c69 100644 --- a/client/docs/TenantPackage.md +++ b/client/docs/TenantPackage.md @@ -8,6 +8,7 @@ | **name** | **String** | | | | **tenant_id** | **String** | | | | **created_at** | **Time** | | | +| **template_id** | **String** | | [optional] | | **monthly_cost_usd** | **Float** | | | | **yearly_cost_usd** | **Float** | | | | **monthly_stripe_plan_id** | **String** | | | @@ -51,6 +52,8 @@ | **flex_domain_unit** | **Float** | | [optional] | | **flex_chat_gpt_cost_cents** | **Float** | | [optional] | | **flex_chat_gpt_unit** | **Float** | | [optional] | +| **flex_llm_cost_cents** | **Float** | | [optional] | +| **flex_llm_unit** | **Float** | | [optional] | | **flex_minimum_cost_cents** | **Float** | | [optional] | | **flex_managed_tenant_cost_cents** | **Float** | | [optional] | | **flex_sso_admin_cost_cents** | **Float** | | [optional] | @@ -58,6 +61,10 @@ | **flex_sso_moderator_cost_cents** | **Float** | | [optional] | | **flex_sso_moderator_unit** | **Float** | | [optional] | | **is_sso_billing_monthly_active_users** | **Boolean** | | [optional] | +| **has_ai_agents** | **Boolean** | | [optional] | +| **max_ai_agents** | **Float** | | [optional] | +| **ai_agent_daily_budget_cents** | **Float** | | [optional] | +| **ai_agent_monthly_budget_cents** | **Float** | | [optional] | ## Example @@ -69,6 +76,7 @@ instance = FastCommentsClient::TenantPackage.new( name: null, tenant_id: null, created_at: null, + template_id: null, monthly_cost_usd: null, yearly_cost_usd: null, monthly_stripe_plan_id: null, @@ -112,13 +120,19 @@ instance = FastCommentsClient::TenantPackage.new( flex_domain_unit: null, flex_chat_gpt_cost_cents: null, flex_chat_gpt_unit: null, + flex_llm_cost_cents: null, + flex_llm_unit: null, flex_minimum_cost_cents: null, flex_managed_tenant_cost_cents: null, flex_sso_admin_cost_cents: null, flex_sso_admin_unit: null, flex_sso_moderator_cost_cents: null, flex_sso_moderator_unit: null, - is_sso_billing_monthly_active_users: null + is_sso_billing_monthly_active_users: null, + has_ai_agents: null, + max_ai_agents: null, + ai_agent_daily_budget_cents: null, + ai_agent_monthly_budget_cents: null ) ``` diff --git a/client/docs/UnBlockCommentPublic200Response.md b/client/docs/UnBlockCommentPublic200Response.md deleted file mode 100644 index cc2ed6a..0000000 --- a/client/docs/UnBlockCommentPublic200Response.md +++ /dev/null @@ -1,34 +0,0 @@ -# FastCommentsClient::UnBlockCommentPublic200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **comment_statuses** | **Hash<String, Boolean>** | Construct a type with a set of properties K of type T | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::UnBlockCommentPublic200Response.new( - status: null, - comment_statuses: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/UpdateUserBadge200Response.md b/client/docs/UpdateUserBadge200Response.md deleted file mode 100644 index 861f1f3..0000000 --- a/client/docs/UpdateUserBadge200Response.md +++ /dev/null @@ -1,32 +0,0 @@ -# FastCommentsClient::UpdateUserBadge200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::UpdateUserBadge200Response.new( - status: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/UpdateUserNotificationCommentSubscriptionStatusResponse.md b/client/docs/UpdateUserNotificationCommentSubscriptionStatusResponse.md new file mode 100644 index 0000000..88166a5 --- /dev/null +++ b/client/docs/UpdateUserNotificationCommentSubscriptionStatusResponse.md @@ -0,0 +1,24 @@ +# FastCommentsClient::UpdateUserNotificationCommentSubscriptionStatusResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | [**APIStatus**](APIStatus.md) | | | +| **matched_count** | **Integer** | | | +| **modified_count** | **Integer** | | | +| **note** | **String** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::UpdateUserNotificationCommentSubscriptionStatusResponse.new( + status: null, + matched_count: null, + modified_count: null, + note: null +) +``` + diff --git a/client/docs/UpdateUserNotificationPageSubscriptionStatusResponse.md b/client/docs/UpdateUserNotificationPageSubscriptionStatusResponse.md new file mode 100644 index 0000000..f256bb9 --- /dev/null +++ b/client/docs/UpdateUserNotificationPageSubscriptionStatusResponse.md @@ -0,0 +1,24 @@ +# FastCommentsClient::UpdateUserNotificationPageSubscriptionStatusResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | [**APIStatus**](APIStatus.md) | | | +| **matched_count** | **Integer** | | | +| **modified_count** | **Integer** | | | +| **note** | **String** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::UpdateUserNotificationPageSubscriptionStatusResponse.new( + status: null, + matched_count: null, + modified_count: null, + note: null +) +``` + diff --git a/client/docs/UpdateUserNotificationStatus200Response.md b/client/docs/UpdateUserNotificationStatus200Response.md deleted file mode 100644 index df0b7f3..0000000 --- a/client/docs/UpdateUserNotificationStatus200Response.md +++ /dev/null @@ -1,38 +0,0 @@ -# FastCommentsClient::UpdateUserNotificationStatus200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **matched_count** | **Integer** | | | -| **modified_count** | **Integer** | | | -| **note** | **String** | | | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::UpdateUserNotificationStatus200Response.new( - status: null, - matched_count: null, - modified_count: null, - note: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/UpdateUserNotificationStatusResponse.md b/client/docs/UpdateUserNotificationStatusResponse.md new file mode 100644 index 0000000..892bf84 --- /dev/null +++ b/client/docs/UpdateUserNotificationStatusResponse.md @@ -0,0 +1,24 @@ +# FastCommentsClient::UpdateUserNotificationStatusResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | [**APIStatus**](APIStatus.md) | | | +| **matched_count** | **Integer** | | | +| **modified_count** | **Integer** | | | +| **note** | **String** | | | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::UpdateUserNotificationStatusResponse.new( + status: null, + matched_count: null, + modified_count: null, + note: null +) +``` + diff --git a/client/docs/User.md b/client/docs/User.md index a9b85f1..d0d1411 100644 --- a/client/docs/User.md +++ b/client/docs/User.md @@ -43,6 +43,7 @@ | **digest_email_frequency** | [**DigestEmailFrequency**](DigestEmailFrequency.md) | | [optional] | | **notification_frequency** | **Float** | | [optional] | | **admin_notification_frequency** | **Float** | | [optional] | +| **agent_approval_notification_frequency** | [**ImportedAgentApprovalNotificationFrequency**](ImportedAgentApprovalNotificationFrequency.md) | | [optional] | | **last_tenant_notification_sent_date** | **Time** | | [optional] | | **last_reply_notification_sent_date** | **Time** | | [optional] | | **ignored_add_to_my_site_messages** | **Boolean** | | [optional] | @@ -109,6 +110,7 @@ instance = FastCommentsClient::User.new( digest_email_frequency: null, notification_frequency: null, admin_notification_frequency: null, + agent_approval_notification_frequency: null, last_tenant_notification_sent_date: null, last_reply_notification_sent_date: null, ignored_add_to_my_site_messages: null, diff --git a/client/docs/UsersListLocation.md b/client/docs/UsersListLocation.md new file mode 100644 index 0000000..d773b3a --- /dev/null +++ b/client/docs/UsersListLocation.md @@ -0,0 +1,15 @@ +# FastCommentsClient::UsersListLocation + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::UsersListLocation.new() +``` + diff --git a/client/docs/VoteComment200Response.md b/client/docs/VoteComment200Response.md deleted file mode 100644 index f1769ba..0000000 --- a/client/docs/VoteComment200Response.md +++ /dev/null @@ -1,40 +0,0 @@ -# FastCommentsClient::VoteComment200Response - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **status** | [**APIStatus**](APIStatus.md) | | | -| **vote_id** | **String** | | [optional] | -| **is_verified** | **Boolean** | | [optional] | -| **user** | [**VoteResponseUser**](VoteResponseUser.md) | | [optional] | -| **edit_key** | **String** | | [optional] | -| **reason** | **String** | | | -| **code** | **String** | | | -| **secondary_code** | **String** | | [optional] | -| **banned_until** | **Integer** | | [optional] | -| **max_character_length** | **Integer** | | [optional] | -| **translated_error** | **String** | | [optional] | -| **custom_config** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] | - -## Example - -```ruby -require 'fastcomments-client' - -instance = FastCommentsClient::VoteComment200Response.new( - status: null, - vote_id: null, - is_verified: null, - user: null, - edit_key: null, - reason: null, - code: null, - secondary_code: null, - banned_until: null, - max_character_length: null, - translated_error: null, - custom_config: null -) -``` - diff --git a/client/docs/VoteResponse.md b/client/docs/VoteResponse.md index 511bacc..a83ce95 100644 --- a/client/docs/VoteResponse.md +++ b/client/docs/VoteResponse.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **status** | **String** | | | +| **status** | [**VoteResponseStatus**](VoteResponseStatus.md) | | | | **vote_id** | **String** | | [optional] | | **is_verified** | **Boolean** | | [optional] | | **user** | [**VoteResponseUser**](VoteResponseUser.md) | | [optional] | diff --git a/client/docs/VoteResponseStatus.md b/client/docs/VoteResponseStatus.md new file mode 100644 index 0000000..b6ab642 --- /dev/null +++ b/client/docs/VoteResponseStatus.md @@ -0,0 +1,15 @@ +# FastCommentsClient::VoteResponseStatus + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +## Example + +```ruby +require 'fastcomments-client' + +instance = FastCommentsClient::VoteResponseStatus.new() +``` + diff --git a/client/fastcomments-client.gemspec b/client/fastcomments-client.gemspec index 9546a20..0639b13 100644 --- a/client/fastcomments-client.gemspec +++ b/client/fastcomments-client.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client.rb b/client/lib/fastcomments-client.rb index 0c15565..155489e 100644 --- a/client/lib/fastcomments-client.rb +++ b/client/lib/fastcomments-client.rb @@ -6,22 +6,26 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end # Common files require 'fastcomments-client/api_client' require 'fastcomments-client/api_error' -require 'fastcomments-client/api_model_base' require 'fastcomments-client/version' require 'fastcomments-client/configuration' # Models require 'fastcomments-client/models/api_audit_log' +require 'fastcomments-client/models/api_ban_user_change_log' +require 'fastcomments-client/models/api_ban_user_changed_values' +require 'fastcomments-client/models/api_banned_user' +require 'fastcomments-client/models/api_banned_user_with_multi_match_info' require 'fastcomments-client/models/api_comment' require 'fastcomments-client/models/api_comment_base' require 'fastcomments-client/models/api_comment_base_meta' +require 'fastcomments-client/models/api_comment_common_banned_user' require 'fastcomments-client/models/api_create_user_badge_response' require 'fastcomments-client/models/api_domain_configuration' require 'fastcomments-client/models/api_empty_response' @@ -33,8 +37,11 @@ require 'fastcomments-client/models/api_get_user_badge_progress_response' require 'fastcomments-client/models/api_get_user_badge_response' require 'fastcomments-client/models/api_get_user_badges_response' +require 'fastcomments-client/models/api_moderate_get_user_ban_preferences_response' +require 'fastcomments-client/models/api_moderate_user_ban_preferences' require 'fastcomments-client/models/api_page' require 'fastcomments-client/models/apisso_user' +require 'fastcomments-client/models/api_save_comment_response' require 'fastcomments-client/models/api_status' require 'fastcomments-client/models/api_tenant' require 'fastcomments-client/models/api_tenant_daily_usage' @@ -42,16 +49,17 @@ require 'fastcomments-client/models/api_ticket_detail' require 'fastcomments-client/models/api_ticket_file' require 'fastcomments-client/models/api_user_subscription' -require 'fastcomments-client/models/add_domain_config200_response' -require 'fastcomments-client/models/add_domain_config200_response_any_of' require 'fastcomments-client/models/add_domain_config_params' -require 'fastcomments-client/models/add_hash_tag200_response' -require 'fastcomments-client/models/add_hash_tags_bulk200_response' +require 'fastcomments-client/models/add_domain_config_response' +require 'fastcomments-client/models/add_domain_config_response_any_of' require 'fastcomments-client/models/add_page_api_response' require 'fastcomments-client/models/add_sso_user_api_response' -require 'fastcomments-client/models/aggregate_question_results200_response' +require 'fastcomments-client/models/adjust_comment_votes_params' +require 'fastcomments-client/models/adjust_votes_response' require 'fastcomments-client/models/aggregate_question_results_response' +require 'fastcomments-client/models/aggregate_response' require 'fastcomments-client/models/aggregate_time_bucket' +require 'fastcomments-client/models/aggregation_api_error' require 'fastcomments-client/models/aggregation_item' require 'fastcomments-client/models/aggregation_op_type' require 'fastcomments-client/models/aggregation_operation' @@ -60,24 +68,30 @@ require 'fastcomments-client/models/aggregation_response' require 'fastcomments-client/models/aggregation_response_stats' require 'fastcomments-client/models/aggregation_value' +require 'fastcomments-client/models/award_user_badge_response' +require 'fastcomments-client/models/ban_user_from_comment_result' +require 'fastcomments-client/models/ban_user_undo_params' +require 'fastcomments-client/models/banned_user_match' +require 'fastcomments-client/models/banned_user_match_matched_on_value' +require 'fastcomments-client/models/banned_user_match_type' require 'fastcomments-client/models/billing_info' require 'fastcomments-client/models/block_from_comment_params' -require 'fastcomments-client/models/block_from_comment_public200_response' require 'fastcomments-client/models/block_success' +require 'fastcomments-client/models/build_moderation_filter_params' +require 'fastcomments-client/models/build_moderation_filter_response' require 'fastcomments-client/models/bulk_aggregate_question_item' -require 'fastcomments-client/models/bulk_aggregate_question_results200_response' require 'fastcomments-client/models/bulk_aggregate_question_results_request' require 'fastcomments-client/models/bulk_aggregate_question_results_response' require 'fastcomments-client/models/bulk_create_hash_tags_body' require 'fastcomments-client/models/bulk_create_hash_tags_body_tags_inner' require 'fastcomments-client/models/bulk_create_hash_tags_response' +require 'fastcomments-client/models/bulk_create_hash_tags_response_results_inner' +require 'fastcomments-client/models/bulk_pre_ban_params' +require 'fastcomments-client/models/bulk_pre_ban_summary' require 'fastcomments-client/models/change_comment_pin_status_response' -require 'fastcomments-client/models/change_ticket_state200_response' require 'fastcomments-client/models/change_ticket_state_body' require 'fastcomments-client/models/change_ticket_state_response' require 'fastcomments-client/models/check_blocked_comments_response' -require 'fastcomments-client/models/checked_comments_for_blocked200_response' -require 'fastcomments-client/models/combine_comments_with_question_results200_response' require 'fastcomments-client/models/combine_question_results_with_comments_response' require 'fastcomments-client/models/comment_data' require 'fastcomments-client/models/comment_html_rendering_mode' @@ -92,56 +106,42 @@ require 'fastcomments-client/models/comment_user_hash_tag_info' require 'fastcomments-client/models/comment_user_mention_info' require 'fastcomments-client/models/commenter_name_formats' +require 'fastcomments-client/models/comments_by_ids_params' require 'fastcomments-client/models/create_api_page_data' require 'fastcomments-client/models/create_apisso_user_data' require 'fastcomments-client/models/create_api_user_subscription_data' require 'fastcomments-client/models/create_comment_params' -require 'fastcomments-client/models/create_comment_public200_response' -require 'fastcomments-client/models/create_email_template200_response' require 'fastcomments-client/models/create_email_template_body' require 'fastcomments-client/models/create_email_template_response' -require 'fastcomments-client/models/create_feed_post200_response' require 'fastcomments-client/models/create_feed_post_params' -require 'fastcomments-client/models/create_feed_post_public200_response' require 'fastcomments-client/models/create_feed_post_response' require 'fastcomments-client/models/create_feed_posts_response' require 'fastcomments-client/models/create_hash_tag_body' require 'fastcomments-client/models/create_hash_tag_response' -require 'fastcomments-client/models/create_moderator200_response' require 'fastcomments-client/models/create_moderator_body' require 'fastcomments-client/models/create_moderator_response' -require 'fastcomments-client/models/create_question_config200_response' require 'fastcomments-client/models/create_question_config_body' require 'fastcomments-client/models/create_question_config_response' -require 'fastcomments-client/models/create_question_result200_response' require 'fastcomments-client/models/create_question_result_body' require 'fastcomments-client/models/create_question_result_response' require 'fastcomments-client/models/create_subscription_api_response' -require 'fastcomments-client/models/create_tenant200_response' require 'fastcomments-client/models/create_tenant_body' -require 'fastcomments-client/models/create_tenant_package200_response' require 'fastcomments-client/models/create_tenant_package_body' require 'fastcomments-client/models/create_tenant_package_response' require 'fastcomments-client/models/create_tenant_response' -require 'fastcomments-client/models/create_tenant_user200_response' require 'fastcomments-client/models/create_tenant_user_body' require 'fastcomments-client/models/create_tenant_user_response' -require 'fastcomments-client/models/create_ticket200_response' require 'fastcomments-client/models/create_ticket_body' require 'fastcomments-client/models/create_ticket_response' -require 'fastcomments-client/models/create_user_badge200_response' require 'fastcomments-client/models/create_user_badge_params' +require 'fastcomments-client/models/create_v1_page_react' require 'fastcomments-client/models/custom_config_parameters' require 'fastcomments-client/models/custom_email_template' -require 'fastcomments-client/models/delete_comment200_response' require 'fastcomments-client/models/delete_comment_action' -require 'fastcomments-client/models/delete_comment_public200_response' require 'fastcomments-client/models/delete_comment_result' -require 'fastcomments-client/models/delete_comment_vote200_response' -require 'fastcomments-client/models/delete_domain_config200_response' -require 'fastcomments-client/models/delete_feed_post_public200_response' -require 'fastcomments-client/models/delete_feed_post_public200_response_any_of' -require 'fastcomments-client/models/delete_hash_tag_request' +require 'fastcomments-client/models/delete_domain_config_response' +require 'fastcomments-client/models/delete_feed_post_public_response' +require 'fastcomments-client/models/delete_hash_tag_request_body' require 'fastcomments-client/models/delete_page_api_response' require 'fastcomments-client/models/delete_sso_user_api_response' require 'fastcomments-client/models/delete_subscription_api_response' @@ -160,126 +160,124 @@ require 'fastcomments-client/models/feed_posts_stats_response' require 'fastcomments-client/models/find_comments_by_range_item' require 'fastcomments-client/models/find_comments_by_range_response' -require 'fastcomments-client/models/flag_comment200_response' -require 'fastcomments-client/models/flag_comment_public200_response' require 'fastcomments-client/models/flag_comment_response' -require 'fastcomments-client/models/get_audit_logs200_response' require 'fastcomments-client/models/get_audit_logs_response' -require 'fastcomments-client/models/get_cached_notification_count200_response' +require 'fastcomments-client/models/get_banned_users_count_response' +require 'fastcomments-client/models/get_banned_users_from_comment_response' require 'fastcomments-client/models/get_cached_notification_count_response' -require 'fastcomments-client/models/get_comment200_response' -require 'fastcomments-client/models/get_comment_text200_response' -require 'fastcomments-client/models/get_comment_vote_user_names200_response' +require 'fastcomments-client/models/get_comment_ban_status_response' +require 'fastcomments-client/models/get_comment_text_response' require 'fastcomments-client/models/get_comment_vote_user_names_success_response' -require 'fastcomments-client/models/get_comments200_response' -require 'fastcomments-client/models/get_comments_public200_response' +require 'fastcomments-client/models/get_comments_for_user_response' require 'fastcomments-client/models/get_comments_response_public_comment' require 'fastcomments-client/models/get_comments_response_with_presence_public_comment' -require 'fastcomments-client/models/get_domain_config200_response' -require 'fastcomments-client/models/get_domain_configs200_response' -require 'fastcomments-client/models/get_domain_configs200_response_any_of' -require 'fastcomments-client/models/get_domain_configs200_response_any_of1' -require 'fastcomments-client/models/get_email_template200_response' -require 'fastcomments-client/models/get_email_template_definitions200_response' +require 'fastcomments-client/models/get_domain_config_response' +require 'fastcomments-client/models/get_domain_configs_response' +require 'fastcomments-client/models/get_domain_configs_response_any_of' +require 'fastcomments-client/models/get_domain_configs_response_any_of1' require 'fastcomments-client/models/get_email_template_definitions_response' -require 'fastcomments-client/models/get_email_template_render_errors200_response' require 'fastcomments-client/models/get_email_template_render_errors_response' require 'fastcomments-client/models/get_email_template_response' -require 'fastcomments-client/models/get_email_templates200_response' require 'fastcomments-client/models/get_email_templates_response' -require 'fastcomments-client/models/get_event_log200_response' require 'fastcomments-client/models/get_event_log_response' -require 'fastcomments-client/models/get_feed_posts200_response' -require 'fastcomments-client/models/get_feed_posts_public200_response' require 'fastcomments-client/models/get_feed_posts_response' -require 'fastcomments-client/models/get_feed_posts_stats200_response' -require 'fastcomments-client/models/get_hash_tags200_response' +require 'fastcomments-client/models/get_gifs_search_response' +require 'fastcomments-client/models/get_gifs_trending_response' require 'fastcomments-client/models/get_hash_tags_response' -require 'fastcomments-client/models/get_moderator200_response' require 'fastcomments-client/models/get_moderator_response' -require 'fastcomments-client/models/get_moderators200_response' require 'fastcomments-client/models/get_moderators_response' require 'fastcomments-client/models/get_my_notifications_response' -require 'fastcomments-client/models/get_notification_count200_response' require 'fastcomments-client/models/get_notification_count_response' -require 'fastcomments-client/models/get_notifications200_response' require 'fastcomments-client/models/get_notifications_response' require 'fastcomments-client/models/get_page_by_urlid_api_response' require 'fastcomments-client/models/get_pages_api_response' -require 'fastcomments-client/models/get_pending_webhook_event_count200_response' require 'fastcomments-client/models/get_pending_webhook_event_count_response' -require 'fastcomments-client/models/get_pending_webhook_events200_response' require 'fastcomments-client/models/get_pending_webhook_events_response' require 'fastcomments-client/models/get_public_feed_posts_response' -require 'fastcomments-client/models/get_question_config200_response' +require 'fastcomments-client/models/get_public_pages_response' require 'fastcomments-client/models/get_question_config_response' -require 'fastcomments-client/models/get_question_configs200_response' require 'fastcomments-client/models/get_question_configs_response' -require 'fastcomments-client/models/get_question_result200_response' require 'fastcomments-client/models/get_question_result_response' -require 'fastcomments-client/models/get_question_results200_response' require 'fastcomments-client/models/get_question_results_response' require 'fastcomments-client/models/get_sso_user_by_email_api_response' require 'fastcomments-client/models/get_sso_user_by_id_api_response' -require 'fastcomments-client/models/get_sso_users200_response' +require 'fastcomments-client/models/get_sso_users_response' require 'fastcomments-client/models/get_subscriptions_api_response' -require 'fastcomments-client/models/get_tenant200_response' -require 'fastcomments-client/models/get_tenant_daily_usages200_response' require 'fastcomments-client/models/get_tenant_daily_usages_response' -require 'fastcomments-client/models/get_tenant_package200_response' +require 'fastcomments-client/models/get_tenant_manual_badges_response' require 'fastcomments-client/models/get_tenant_package_response' -require 'fastcomments-client/models/get_tenant_packages200_response' require 'fastcomments-client/models/get_tenant_packages_response' require 'fastcomments-client/models/get_tenant_response' -require 'fastcomments-client/models/get_tenant_user200_response' require 'fastcomments-client/models/get_tenant_user_response' -require 'fastcomments-client/models/get_tenant_users200_response' require 'fastcomments-client/models/get_tenant_users_response' -require 'fastcomments-client/models/get_tenants200_response' require 'fastcomments-client/models/get_tenants_response' -require 'fastcomments-client/models/get_ticket200_response' require 'fastcomments-client/models/get_ticket_response' -require 'fastcomments-client/models/get_tickets200_response' require 'fastcomments-client/models/get_tickets_response' -require 'fastcomments-client/models/get_user200_response' -require 'fastcomments-client/models/get_user_badge200_response' -require 'fastcomments-client/models/get_user_badge_progress_by_id200_response' -require 'fastcomments-client/models/get_user_badge_progress_list200_response' -require 'fastcomments-client/models/get_user_badges200_response' -require 'fastcomments-client/models/get_user_notification_count200_response' +require 'fastcomments-client/models/get_translations_response' +require 'fastcomments-client/models/get_user_internal_profile_response' +require 'fastcomments-client/models/get_user_internal_profile_response_profile' +require 'fastcomments-client/models/get_user_manual_badges_response' require 'fastcomments-client/models/get_user_notification_count_response' -require 'fastcomments-client/models/get_user_notifications200_response' -require 'fastcomments-client/models/get_user_presence_statuses200_response' require 'fastcomments-client/models/get_user_presence_statuses_response' -require 'fastcomments-client/models/get_user_reacts_public200_response' require 'fastcomments-client/models/get_user_response' -require 'fastcomments-client/models/get_votes200_response' -require 'fastcomments-client/models/get_votes_for_user200_response' +require 'fastcomments-client/models/get_user_trust_factor_response' +require 'fastcomments-client/models/get_v1_page_likes' +require 'fastcomments-client/models/get_v2_page_react_users_response' +require 'fastcomments-client/models/get_v2_page_reacts' require 'fastcomments-client/models/get_votes_for_user_response' require 'fastcomments-client/models/get_votes_response' +require 'fastcomments-client/models/gif_get_large_response' require 'fastcomments-client/models/gif_rating' +require 'fastcomments-client/models/gif_search_internal_error' +require 'fastcomments-client/models/gif_search_response' +require 'fastcomments-client/models/gif_search_response_images_inner_inner' require 'fastcomments-client/models/header_account_notification' require 'fastcomments-client/models/header_state' require 'fastcomments-client/models/ignored_response' require 'fastcomments-client/models/image_content_profanity_level' +require 'fastcomments-client/models/imported_agent_approval_notification_frequency' require 'fastcomments-client/models/imported_site_type' require 'fastcomments-client/models/live_event' require 'fastcomments-client/models/live_event_extra_info' require 'fastcomments-client/models/live_event_type' -require 'fastcomments-client/models/lock_comment200_response' require 'fastcomments-client/models/media_asset' require 'fastcomments-client/models/mention_auto_complete_mode' require 'fastcomments-client/models/meta_item' +require 'fastcomments-client/models/moderation_api_child_comments_response' +require 'fastcomments-client/models/moderation_api_comment' +require 'fastcomments-client/models/moderation_api_comment_log' +require 'fastcomments-client/models/moderation_api_comment_response' +require 'fastcomments-client/models/moderation_api_count_comments_response' +require 'fastcomments-client/models/moderation_api_get_comment_ids_response' +require 'fastcomments-client/models/moderation_api_get_comments_response' +require 'fastcomments-client/models/moderation_api_get_logs_response' +require 'fastcomments-client/models/moderation_comment_search_response' +require 'fastcomments-client/models/moderation_export_response' +require 'fastcomments-client/models/moderation_export_status_response' +require 'fastcomments-client/models/moderation_filter' +require 'fastcomments-client/models/moderation_page_search_projected' +require 'fastcomments-client/models/moderation_page_search_response' +require 'fastcomments-client/models/moderation_site_search_projected' +require 'fastcomments-client/models/moderation_site_search_response' +require 'fastcomments-client/models/moderation_suggest_response' +require 'fastcomments-client/models/moderation_user_search_projected' +require 'fastcomments-client/models/moderation_user_search_response' require 'fastcomments-client/models/moderator' require 'fastcomments-client/models/notification_and_count' require 'fastcomments-client/models/notification_object_type' require 'fastcomments-client/models/notification_type' +require 'fastcomments-client/models/page_user_entry' +require 'fastcomments-client/models/page_users_info_response' +require 'fastcomments-client/models/page_users_offline_response' +require 'fastcomments-client/models/page_users_online_response' +require 'fastcomments-client/models/pages_sort_by' require 'fastcomments-client/models/patch_domain_config_params' -require 'fastcomments-client/models/patch_hash_tag200_response' +require 'fastcomments-client/models/patch_domain_config_response' require 'fastcomments-client/models/patch_page_api_response' require 'fastcomments-client/models/patch_sso_user_api_response' require 'fastcomments-client/models/pending_comment_to_sync_outbound' -require 'fastcomments-client/models/pin_comment200_response' +require 'fastcomments-client/models/post_remove_comment_response' +require 'fastcomments-client/models/pre_ban_summary' require 'fastcomments-client/models/pub_sub_comment' require 'fastcomments-client/models/pub_sub_comment_base' require 'fastcomments-client/models/pub_sub_vote' @@ -290,7 +288,9 @@ require 'fastcomments-client/models/public_comment' require 'fastcomments-client/models/public_comment_base' require 'fastcomments-client/models/public_feed_posts_response' +require 'fastcomments-client/models/public_page' require 'fastcomments-client/models/public_vote' +require 'fastcomments-client/models/put_domain_config_response' require 'fastcomments-client/models/put_sso_user_api_response' require 'fastcomments-client/models/query_predicate' require 'fastcomments-client/models/query_predicate_value' @@ -303,11 +303,10 @@ require 'fastcomments-client/models/question_sub_question_visibility' require 'fastcomments-client/models/question_when_save' require 'fastcomments-client/models/react_body_params' -require 'fastcomments-client/models/react_feed_post_public200_response' require 'fastcomments-client/models/react_feed_post_response' require 'fastcomments-client/models/record_string_before_string_or_null_after_string_or_null_value' -require 'fastcomments-client/models/record_string_string_or_number_value' -require 'fastcomments-client/models/render_email_template200_response' +require 'fastcomments-client/models/remove_comment_action_response' +require 'fastcomments-client/models/remove_user_badge_response' require 'fastcomments-client/models/render_email_template_body' require 'fastcomments-client/models/render_email_template_response' require 'fastcomments-client/models/renderable_user_notification' @@ -315,26 +314,27 @@ require 'fastcomments-client/models/repeat_comment_handling_action' require 'fastcomments-client/models/replace_tenant_package_body' require 'fastcomments-client/models/replace_tenant_user_body' -require 'fastcomments-client/models/reset_user_notifications200_response' require 'fastcomments-client/models/reset_user_notifications_response' require 'fastcomments-client/models/sortdir' require 'fastcomments-client/models/sso_security_level' -require 'fastcomments-client/models/save_comment200_response' -require 'fastcomments-client/models/save_comment_response' require 'fastcomments-client/models/save_comment_response_optimized' +require 'fastcomments-client/models/save_comments_bulk_response' require 'fastcomments-client/models/save_comments_response_with_presence' -require 'fastcomments-client/models/search_users200_response' require 'fastcomments-client/models/search_users_response' +require 'fastcomments-client/models/search_users_result' require 'fastcomments-client/models/search_users_sectioned_response' -require 'fastcomments-client/models/set_comment_text200_response' +require 'fastcomments-client/models/set_comment_approved_response' +require 'fastcomments-client/models/set_comment_text_params' +require 'fastcomments-client/models/set_comment_text_response' require 'fastcomments-client/models/set_comment_text_result' +require 'fastcomments-client/models/set_user_trust_factor_response' require 'fastcomments-client/models/size_preset' require 'fastcomments-client/models/sort_directions' require 'fastcomments-client/models/spam_rule' require 'fastcomments-client/models/tos_config' +require 'fastcomments-client/models/tenant_badge' require 'fastcomments-client/models/tenant_hash_tag' require 'fastcomments-client/models/tenant_package' -require 'fastcomments-client/models/un_block_comment_public200_response' require 'fastcomments-client/models/un_block_from_comment_params' require 'fastcomments-client/models/unblock_success' require 'fastcomments-client/models/updatable_comment_params' @@ -354,9 +354,10 @@ require 'fastcomments-client/models/update_tenant_body' require 'fastcomments-client/models/update_tenant_package_body' require 'fastcomments-client/models/update_tenant_user_body' -require 'fastcomments-client/models/update_user_badge200_response' require 'fastcomments-client/models/update_user_badge_params' -require 'fastcomments-client/models/update_user_notification_status200_response' +require 'fastcomments-client/models/update_user_notification_comment_subscription_status_response' +require 'fastcomments-client/models/update_user_notification_page_subscription_status_response' +require 'fastcomments-client/models/update_user_notification_status_response' require 'fastcomments-client/models/upload_image_response' require 'fastcomments-client/models/user' require 'fastcomments-client/models/user_badge' @@ -370,15 +371,17 @@ require 'fastcomments-client/models/user_search_section' require 'fastcomments-client/models/user_search_section_result' require 'fastcomments-client/models/user_session_info' +require 'fastcomments-client/models/users_list_location' require 'fastcomments-client/models/vote_body_params' -require 'fastcomments-client/models/vote_comment200_response' require 'fastcomments-client/models/vote_delete_response' require 'fastcomments-client/models/vote_response' +require 'fastcomments-client/models/vote_response_status' require 'fastcomments-client/models/vote_response_user' require 'fastcomments-client/models/vote_style' # APIs require 'fastcomments-client/api/default_api' +require 'fastcomments-client/api/moderation_api' require 'fastcomments-client/api/public_api' module FastCommentsClient diff --git a/client/lib/fastcomments-client/api/default_api.rb b/client/lib/fastcomments-client/api/default_api.rb index f055ceb..2b3ce3c 100644 --- a/client/lib/fastcomments-client/api/default_api.rb +++ b/client/lib/fastcomments-client/api/default_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -22,7 +22,7 @@ def initialize(api_client = ApiClient.default) # @param tenant_id [String] # @param add_domain_config_params [AddDomainConfigParams] # @param [Hash] opts the optional parameters - # @return [AddDomainConfig200Response] + # @return [AddDomainConfigResponse] def add_domain_config(tenant_id, add_domain_config_params, opts = {}) data, _status_code, _headers = add_domain_config_with_http_info(tenant_id, add_domain_config_params, opts) data @@ -31,7 +31,7 @@ def add_domain_config(tenant_id, add_domain_config_params, opts = {}) # @param tenant_id [String] # @param add_domain_config_params [AddDomainConfigParams] # @param [Hash] opts the optional parameters - # @return [Array<(AddDomainConfig200Response, Integer, Hash)>] AddDomainConfig200Response data, response status code and response headers + # @return [Array<(AddDomainConfigResponse, Integer, Hash)>] AddDomainConfigResponse data, response status code and response headers def add_domain_config_with_http_info(tenant_id, add_domain_config_params, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.add_domain_config ...' @@ -68,7 +68,7 @@ def add_domain_config_with_http_info(tenant_id, add_domain_config_params, opts = post_body = opts[:debug_body] || @api_client.object_to_http_body(add_domain_config_params) # return_type - return_type = opts[:debug_return_type] || 'AddDomainConfig200Response' + return_type = opts[:debug_return_type] || 'AddDomainConfigResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -93,7 +93,7 @@ def add_domain_config_with_http_info(tenant_id, add_domain_config_params, opts = # @param [Hash] opts the optional parameters # @option opts [String] :tenant_id # @option opts [CreateHashTagBody] :create_hash_tag_body - # @return [AddHashTag200Response] + # @return [CreateHashTagResponse] def add_hash_tag(opts = {}) data, _status_code, _headers = add_hash_tag_with_http_info(opts) data @@ -102,7 +102,7 @@ def add_hash_tag(opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :tenant_id # @option opts [CreateHashTagBody] :create_hash_tag_body - # @return [Array<(AddHashTag200Response, Integer, Hash)>] AddHashTag200Response data, response status code and response headers + # @return [Array<(CreateHashTagResponse, Integer, Hash)>] CreateHashTagResponse data, response status code and response headers def add_hash_tag_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.add_hash_tag ...' @@ -131,7 +131,7 @@ def add_hash_tag_with_http_info(opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_hash_tag_body']) # return_type - return_type = opts[:debug_return_type] || 'AddHashTag200Response' + return_type = opts[:debug_return_type] || 'CreateHashTagResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -156,7 +156,7 @@ def add_hash_tag_with_http_info(opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :tenant_id # @option opts [BulkCreateHashTagsBody] :bulk_create_hash_tags_body - # @return [AddHashTagsBulk200Response] + # @return [BulkCreateHashTagsResponse] def add_hash_tags_bulk(opts = {}) data, _status_code, _headers = add_hash_tags_bulk_with_http_info(opts) data @@ -165,7 +165,7 @@ def add_hash_tags_bulk(opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :tenant_id # @option opts [BulkCreateHashTagsBody] :bulk_create_hash_tags_body - # @return [Array<(AddHashTagsBulk200Response, Integer, Hash)>] AddHashTagsBulk200Response data, response status code and response headers + # @return [Array<(BulkCreateHashTagsResponse, Integer, Hash)>] BulkCreateHashTagsResponse data, response status code and response headers def add_hash_tags_bulk_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.add_hash_tags_bulk ...' @@ -194,7 +194,7 @@ def add_hash_tags_bulk_with_http_info(opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'bulk_create_hash_tags_body']) # return_type - return_type = opts[:debug_return_type] || 'AddHashTagsBulk200Response' + return_type = opts[:debug_return_type] || 'BulkCreateHashTagsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -364,7 +364,7 @@ def add_sso_user_with_http_info(tenant_id, create_apisso_user_data, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :parent_tenant_id # @option opts [Boolean] :include_stats - # @return [AggregationResponse] + # @return [AggregateResponse] def aggregate(tenant_id, aggregation_request, opts = {}) data, _status_code, _headers = aggregate_with_http_info(tenant_id, aggregation_request, opts) data @@ -376,7 +376,7 @@ def aggregate(tenant_id, aggregation_request, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :parent_tenant_id # @option opts [Boolean] :include_stats - # @return [Array<(AggregationResponse, Integer, Hash)>] AggregationResponse data, response status code and response headers + # @return [Array<(AggregateResponse, Integer, Hash)>] AggregateResponse data, response status code and response headers def aggregate_with_http_info(tenant_id, aggregation_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.aggregate ...' @@ -415,7 +415,7 @@ def aggregate_with_http_info(tenant_id, aggregation_request, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(aggregation_request) # return_type - return_type = opts[:debug_return_type] || 'AggregationResponse' + return_type = opts[:debug_return_type] || 'AggregateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -445,7 +445,7 @@ def aggregate_with_http_info(tenant_id, aggregation_request, opts = {}) # @option opts [AggregateTimeBucket] :time_bucket # @option opts [Time] :start_date # @option opts [Boolean] :force_recalculate - # @return [AggregateQuestionResults200Response] + # @return [AggregateQuestionResultsResponse] def aggregate_question_results(tenant_id, opts = {}) data, _status_code, _headers = aggregate_question_results_with_http_info(tenant_id, opts) data @@ -459,7 +459,7 @@ def aggregate_question_results(tenant_id, opts = {}) # @option opts [AggregateTimeBucket] :time_bucket # @option opts [Time] :start_date # @option opts [Boolean] :force_recalculate - # @return [Array<(AggregateQuestionResults200Response, Integer, Hash)>] AggregateQuestionResults200Response data, response status code and response headers + # @return [Array<(AggregateQuestionResultsResponse, Integer, Hash)>] AggregateQuestionResultsResponse data, response status code and response headers def aggregate_question_results_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.aggregate_question_results ...' @@ -493,7 +493,7 @@ def aggregate_question_results_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'AggregateQuestionResults200Response' + return_type = opts[:debug_return_type] || 'AggregateQuestionResultsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -521,7 +521,7 @@ def aggregate_question_results_with_http_info(tenant_id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [BlockFromCommentPublic200Response] + # @return [BlockSuccess] def block_user_from_comment(tenant_id, id, block_from_comment_params, opts = {}) data, _status_code, _headers = block_user_from_comment_with_http_info(tenant_id, id, block_from_comment_params, opts) data @@ -533,7 +533,7 @@ def block_user_from_comment(tenant_id, id, block_from_comment_params, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [Array<(BlockFromCommentPublic200Response, Integer, Hash)>] BlockFromCommentPublic200Response data, response status code and response headers + # @return [Array<(BlockSuccess, Integer, Hash)>] BlockSuccess data, response status code and response headers def block_user_from_comment_with_http_info(tenant_id, id, block_from_comment_params, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.block_user_from_comment ...' @@ -576,7 +576,7 @@ def block_user_from_comment_with_http_info(tenant_id, id, block_from_comment_par post_body = opts[:debug_body] || @api_client.object_to_http_body(block_from_comment_params) # return_type - return_type = opts[:debug_return_type] || 'BlockFromCommentPublic200Response' + return_type = opts[:debug_return_type] || 'BlockSuccess' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -602,7 +602,7 @@ def block_user_from_comment_with_http_info(tenant_id, id, block_from_comment_par # @param bulk_aggregate_question_results_request [BulkAggregateQuestionResultsRequest] # @param [Hash] opts the optional parameters # @option opts [Boolean] :force_recalculate - # @return [BulkAggregateQuestionResults200Response] + # @return [BulkAggregateQuestionResultsResponse] def bulk_aggregate_question_results(tenant_id, bulk_aggregate_question_results_request, opts = {}) data, _status_code, _headers = bulk_aggregate_question_results_with_http_info(tenant_id, bulk_aggregate_question_results_request, opts) data @@ -612,7 +612,7 @@ def bulk_aggregate_question_results(tenant_id, bulk_aggregate_question_results_r # @param bulk_aggregate_question_results_request [BulkAggregateQuestionResultsRequest] # @param [Hash] opts the optional parameters # @option opts [Boolean] :force_recalculate - # @return [Array<(BulkAggregateQuestionResults200Response, Integer, Hash)>] BulkAggregateQuestionResults200Response data, response status code and response headers + # @return [Array<(BulkAggregateQuestionResultsResponse, Integer, Hash)>] BulkAggregateQuestionResultsResponse data, response status code and response headers def bulk_aggregate_question_results_with_http_info(tenant_id, bulk_aggregate_question_results_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.bulk_aggregate_question_results ...' @@ -650,7 +650,7 @@ def bulk_aggregate_question_results_with_http_info(tenant_id, bulk_aggregate_que post_body = opts[:debug_body] || @api_client.object_to_http_body(bulk_aggregate_question_results_request) # return_type - return_type = opts[:debug_return_type] || 'BulkAggregateQuestionResults200Response' + return_type = opts[:debug_return_type] || 'BulkAggregateQuestionResultsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -677,7 +677,7 @@ def bulk_aggregate_question_results_with_http_info(tenant_id, bulk_aggregate_que # @param id [String] # @param change_ticket_state_body [ChangeTicketStateBody] # @param [Hash] opts the optional parameters - # @return [ChangeTicketState200Response] + # @return [ChangeTicketStateResponse] def change_ticket_state(tenant_id, user_id, id, change_ticket_state_body, opts = {}) data, _status_code, _headers = change_ticket_state_with_http_info(tenant_id, user_id, id, change_ticket_state_body, opts) data @@ -688,7 +688,7 @@ def change_ticket_state(tenant_id, user_id, id, change_ticket_state_body, opts = # @param id [String] # @param change_ticket_state_body [ChangeTicketStateBody] # @param [Hash] opts the optional parameters - # @return [Array<(ChangeTicketState200Response, Integer, Hash)>] ChangeTicketState200Response data, response status code and response headers + # @return [Array<(ChangeTicketStateResponse, Integer, Hash)>] ChangeTicketStateResponse data, response status code and response headers def change_ticket_state_with_http_info(tenant_id, user_id, id, change_ticket_state_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.change_ticket_state ...' @@ -734,7 +734,7 @@ def change_ticket_state_with_http_info(tenant_id, user_id, id, change_ticket_sta post_body = opts[:debug_body] || @api_client.object_to_http_body(change_ticket_state_body) # return_type - return_type = opts[:debug_return_type] || 'ChangeTicketState200Response' + return_type = opts[:debug_return_type] || 'ChangeTicketStateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -766,7 +766,7 @@ def change_ticket_state_with_http_info(tenant_id, user_id, id, change_ticket_sta # @option opts [Float] :min_value # @option opts [Float] :max_value # @option opts [Float] :limit - # @return [CombineCommentsWithQuestionResults200Response] + # @return [CombineQuestionResultsWithCommentsResponse] def combine_comments_with_question_results(tenant_id, opts = {}) data, _status_code, _headers = combine_comments_with_question_results_with_http_info(tenant_id, opts) data @@ -782,7 +782,7 @@ def combine_comments_with_question_results(tenant_id, opts = {}) # @option opts [Float] :min_value # @option opts [Float] :max_value # @option opts [Float] :limit - # @return [Array<(CombineCommentsWithQuestionResults200Response, Integer, Hash)>] CombineCommentsWithQuestionResults200Response data, response status code and response headers + # @return [Array<(CombineQuestionResultsWithCommentsResponse, Integer, Hash)>] CombineQuestionResultsWithCommentsResponse data, response status code and response headers def combine_comments_with_question_results_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.combine_comments_with_question_results ...' @@ -818,7 +818,7 @@ def combine_comments_with_question_results_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'CombineCommentsWithQuestionResults200Response' + return_type = opts[:debug_return_type] || 'CombineQuestionResultsWithCommentsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -843,7 +843,7 @@ def combine_comments_with_question_results_with_http_info(tenant_id, opts = {}) # @param tenant_id [String] # @param create_email_template_body [CreateEmailTemplateBody] # @param [Hash] opts the optional parameters - # @return [CreateEmailTemplate200Response] + # @return [CreateEmailTemplateResponse] def create_email_template(tenant_id, create_email_template_body, opts = {}) data, _status_code, _headers = create_email_template_with_http_info(tenant_id, create_email_template_body, opts) data @@ -852,7 +852,7 @@ def create_email_template(tenant_id, create_email_template_body, opts = {}) # @param tenant_id [String] # @param create_email_template_body [CreateEmailTemplateBody] # @param [Hash] opts the optional parameters - # @return [Array<(CreateEmailTemplate200Response, Integer, Hash)>] CreateEmailTemplate200Response data, response status code and response headers + # @return [Array<(CreateEmailTemplateResponse, Integer, Hash)>] CreateEmailTemplateResponse data, response status code and response headers def create_email_template_with_http_info(tenant_id, create_email_template_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.create_email_template ...' @@ -889,7 +889,7 @@ def create_email_template_with_http_info(tenant_id, create_email_template_body, post_body = opts[:debug_body] || @api_client.object_to_http_body(create_email_template_body) # return_type - return_type = opts[:debug_return_type] || 'CreateEmailTemplate200Response' + return_type = opts[:debug_return_type] || 'CreateEmailTemplateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -918,7 +918,7 @@ def create_email_template_with_http_info(tenant_id, create_email_template_body, # @option opts [Boolean] :is_live # @option opts [Boolean] :do_spam_check # @option opts [Boolean] :skip_dup_check - # @return [CreateFeedPost200Response] + # @return [CreateFeedPostsResponse] def create_feed_post(tenant_id, create_feed_post_params, opts = {}) data, _status_code, _headers = create_feed_post_with_http_info(tenant_id, create_feed_post_params, opts) data @@ -931,7 +931,7 @@ def create_feed_post(tenant_id, create_feed_post_params, opts = {}) # @option opts [Boolean] :is_live # @option opts [Boolean] :do_spam_check # @option opts [Boolean] :skip_dup_check - # @return [Array<(CreateFeedPost200Response, Integer, Hash)>] CreateFeedPost200Response data, response status code and response headers + # @return [Array<(CreateFeedPostsResponse, Integer, Hash)>] CreateFeedPostsResponse data, response status code and response headers def create_feed_post_with_http_info(tenant_id, create_feed_post_params, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.create_feed_post ...' @@ -972,7 +972,7 @@ def create_feed_post_with_http_info(tenant_id, create_feed_post_params, opts = { post_body = opts[:debug_body] || @api_client.object_to_http_body(create_feed_post_params) # return_type - return_type = opts[:debug_return_type] || 'CreateFeedPost200Response' + return_type = opts[:debug_return_type] || 'CreateFeedPostsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -997,7 +997,7 @@ def create_feed_post_with_http_info(tenant_id, create_feed_post_params, opts = { # @param tenant_id [String] # @param create_moderator_body [CreateModeratorBody] # @param [Hash] opts the optional parameters - # @return [CreateModerator200Response] + # @return [CreateModeratorResponse] def create_moderator(tenant_id, create_moderator_body, opts = {}) data, _status_code, _headers = create_moderator_with_http_info(tenant_id, create_moderator_body, opts) data @@ -1006,7 +1006,7 @@ def create_moderator(tenant_id, create_moderator_body, opts = {}) # @param tenant_id [String] # @param create_moderator_body [CreateModeratorBody] # @param [Hash] opts the optional parameters - # @return [Array<(CreateModerator200Response, Integer, Hash)>] CreateModerator200Response data, response status code and response headers + # @return [Array<(CreateModeratorResponse, Integer, Hash)>] CreateModeratorResponse data, response status code and response headers def create_moderator_with_http_info(tenant_id, create_moderator_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.create_moderator ...' @@ -1043,7 +1043,7 @@ def create_moderator_with_http_info(tenant_id, create_moderator_body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_moderator_body) # return_type - return_type = opts[:debug_return_type] || 'CreateModerator200Response' + return_type = opts[:debug_return_type] || 'CreateModeratorResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -1068,7 +1068,7 @@ def create_moderator_with_http_info(tenant_id, create_moderator_body, opts = {}) # @param tenant_id [String] # @param create_question_config_body [CreateQuestionConfigBody] # @param [Hash] opts the optional parameters - # @return [CreateQuestionConfig200Response] + # @return [CreateQuestionConfigResponse] def create_question_config(tenant_id, create_question_config_body, opts = {}) data, _status_code, _headers = create_question_config_with_http_info(tenant_id, create_question_config_body, opts) data @@ -1077,7 +1077,7 @@ def create_question_config(tenant_id, create_question_config_body, opts = {}) # @param tenant_id [String] # @param create_question_config_body [CreateQuestionConfigBody] # @param [Hash] opts the optional parameters - # @return [Array<(CreateQuestionConfig200Response, Integer, Hash)>] CreateQuestionConfig200Response data, response status code and response headers + # @return [Array<(CreateQuestionConfigResponse, Integer, Hash)>] CreateQuestionConfigResponse data, response status code and response headers def create_question_config_with_http_info(tenant_id, create_question_config_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.create_question_config ...' @@ -1114,7 +1114,7 @@ def create_question_config_with_http_info(tenant_id, create_question_config_body post_body = opts[:debug_body] || @api_client.object_to_http_body(create_question_config_body) # return_type - return_type = opts[:debug_return_type] || 'CreateQuestionConfig200Response' + return_type = opts[:debug_return_type] || 'CreateQuestionConfigResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -1139,7 +1139,7 @@ def create_question_config_with_http_info(tenant_id, create_question_config_body # @param tenant_id [String] # @param create_question_result_body [CreateQuestionResultBody] # @param [Hash] opts the optional parameters - # @return [CreateQuestionResult200Response] + # @return [CreateQuestionResultResponse] def create_question_result(tenant_id, create_question_result_body, opts = {}) data, _status_code, _headers = create_question_result_with_http_info(tenant_id, create_question_result_body, opts) data @@ -1148,7 +1148,7 @@ def create_question_result(tenant_id, create_question_result_body, opts = {}) # @param tenant_id [String] # @param create_question_result_body [CreateQuestionResultBody] # @param [Hash] opts the optional parameters - # @return [Array<(CreateQuestionResult200Response, Integer, Hash)>] CreateQuestionResult200Response data, response status code and response headers + # @return [Array<(CreateQuestionResultResponse, Integer, Hash)>] CreateQuestionResultResponse data, response status code and response headers def create_question_result_with_http_info(tenant_id, create_question_result_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.create_question_result ...' @@ -1185,7 +1185,7 @@ def create_question_result_with_http_info(tenant_id, create_question_result_body post_body = opts[:debug_body] || @api_client.object_to_http_body(create_question_result_body) # return_type - return_type = opts[:debug_return_type] || 'CreateQuestionResult200Response' + return_type = opts[:debug_return_type] || 'CreateQuestionResultResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -1281,7 +1281,7 @@ def create_subscription_with_http_info(tenant_id, create_api_user_subscription_d # @param tenant_id [String] # @param create_tenant_body [CreateTenantBody] # @param [Hash] opts the optional parameters - # @return [CreateTenant200Response] + # @return [CreateTenantResponse] def create_tenant(tenant_id, create_tenant_body, opts = {}) data, _status_code, _headers = create_tenant_with_http_info(tenant_id, create_tenant_body, opts) data @@ -1290,7 +1290,7 @@ def create_tenant(tenant_id, create_tenant_body, opts = {}) # @param tenant_id [String] # @param create_tenant_body [CreateTenantBody] # @param [Hash] opts the optional parameters - # @return [Array<(CreateTenant200Response, Integer, Hash)>] CreateTenant200Response data, response status code and response headers + # @return [Array<(CreateTenantResponse, Integer, Hash)>] CreateTenantResponse data, response status code and response headers def create_tenant_with_http_info(tenant_id, create_tenant_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.create_tenant ...' @@ -1327,7 +1327,7 @@ def create_tenant_with_http_info(tenant_id, create_tenant_body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_tenant_body) # return_type - return_type = opts[:debug_return_type] || 'CreateTenant200Response' + return_type = opts[:debug_return_type] || 'CreateTenantResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -1352,7 +1352,7 @@ def create_tenant_with_http_info(tenant_id, create_tenant_body, opts = {}) # @param tenant_id [String] # @param create_tenant_package_body [CreateTenantPackageBody] # @param [Hash] opts the optional parameters - # @return [CreateTenantPackage200Response] + # @return [CreateTenantPackageResponse] def create_tenant_package(tenant_id, create_tenant_package_body, opts = {}) data, _status_code, _headers = create_tenant_package_with_http_info(tenant_id, create_tenant_package_body, opts) data @@ -1361,7 +1361,7 @@ def create_tenant_package(tenant_id, create_tenant_package_body, opts = {}) # @param tenant_id [String] # @param create_tenant_package_body [CreateTenantPackageBody] # @param [Hash] opts the optional parameters - # @return [Array<(CreateTenantPackage200Response, Integer, Hash)>] CreateTenantPackage200Response data, response status code and response headers + # @return [Array<(CreateTenantPackageResponse, Integer, Hash)>] CreateTenantPackageResponse data, response status code and response headers def create_tenant_package_with_http_info(tenant_id, create_tenant_package_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.create_tenant_package ...' @@ -1398,7 +1398,7 @@ def create_tenant_package_with_http_info(tenant_id, create_tenant_package_body, post_body = opts[:debug_body] || @api_client.object_to_http_body(create_tenant_package_body) # return_type - return_type = opts[:debug_return_type] || 'CreateTenantPackage200Response' + return_type = opts[:debug_return_type] || 'CreateTenantPackageResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -1423,7 +1423,7 @@ def create_tenant_package_with_http_info(tenant_id, create_tenant_package_body, # @param tenant_id [String] # @param create_tenant_user_body [CreateTenantUserBody] # @param [Hash] opts the optional parameters - # @return [CreateTenantUser200Response] + # @return [CreateTenantUserResponse] def create_tenant_user(tenant_id, create_tenant_user_body, opts = {}) data, _status_code, _headers = create_tenant_user_with_http_info(tenant_id, create_tenant_user_body, opts) data @@ -1432,7 +1432,7 @@ def create_tenant_user(tenant_id, create_tenant_user_body, opts = {}) # @param tenant_id [String] # @param create_tenant_user_body [CreateTenantUserBody] # @param [Hash] opts the optional parameters - # @return [Array<(CreateTenantUser200Response, Integer, Hash)>] CreateTenantUser200Response data, response status code and response headers + # @return [Array<(CreateTenantUserResponse, Integer, Hash)>] CreateTenantUserResponse data, response status code and response headers def create_tenant_user_with_http_info(tenant_id, create_tenant_user_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.create_tenant_user ...' @@ -1469,7 +1469,7 @@ def create_tenant_user_with_http_info(tenant_id, create_tenant_user_body, opts = post_body = opts[:debug_body] || @api_client.object_to_http_body(create_tenant_user_body) # return_type - return_type = opts[:debug_return_type] || 'CreateTenantUser200Response' + return_type = opts[:debug_return_type] || 'CreateTenantUserResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -1495,7 +1495,7 @@ def create_tenant_user_with_http_info(tenant_id, create_tenant_user_body, opts = # @param user_id [String] # @param create_ticket_body [CreateTicketBody] # @param [Hash] opts the optional parameters - # @return [CreateTicket200Response] + # @return [CreateTicketResponse] def create_ticket(tenant_id, user_id, create_ticket_body, opts = {}) data, _status_code, _headers = create_ticket_with_http_info(tenant_id, user_id, create_ticket_body, opts) data @@ -1505,7 +1505,7 @@ def create_ticket(tenant_id, user_id, create_ticket_body, opts = {}) # @param user_id [String] # @param create_ticket_body [CreateTicketBody] # @param [Hash] opts the optional parameters - # @return [Array<(CreateTicket200Response, Integer, Hash)>] CreateTicket200Response data, response status code and response headers + # @return [Array<(CreateTicketResponse, Integer, Hash)>] CreateTicketResponse data, response status code and response headers def create_ticket_with_http_info(tenant_id, user_id, create_ticket_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.create_ticket ...' @@ -1547,7 +1547,7 @@ def create_ticket_with_http_info(tenant_id, user_id, create_ticket_body, opts = post_body = opts[:debug_body] || @api_client.object_to_http_body(create_ticket_body) # return_type - return_type = opts[:debug_return_type] || 'CreateTicket200Response' + return_type = opts[:debug_return_type] || 'CreateTicketResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -1572,7 +1572,7 @@ def create_ticket_with_http_info(tenant_id, user_id, create_ticket_body, opts = # @param tenant_id [String] # @param create_user_badge_params [CreateUserBadgeParams] # @param [Hash] opts the optional parameters - # @return [CreateUserBadge200Response] + # @return [APICreateUserBadgeResponse] def create_user_badge(tenant_id, create_user_badge_params, opts = {}) data, _status_code, _headers = create_user_badge_with_http_info(tenant_id, create_user_badge_params, opts) data @@ -1581,7 +1581,7 @@ def create_user_badge(tenant_id, create_user_badge_params, opts = {}) # @param tenant_id [String] # @param create_user_badge_params [CreateUserBadgeParams] # @param [Hash] opts the optional parameters - # @return [Array<(CreateUserBadge200Response, Integer, Hash)>] CreateUserBadge200Response data, response status code and response headers + # @return [Array<(APICreateUserBadgeResponse, Integer, Hash)>] APICreateUserBadgeResponse data, response status code and response headers def create_user_badge_with_http_info(tenant_id, create_user_badge_params, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.create_user_badge ...' @@ -1618,7 +1618,7 @@ def create_user_badge_with_http_info(tenant_id, create_user_badge_params, opts = post_body = opts[:debug_body] || @api_client.object_to_http_body(create_user_badge_params) # return_type - return_type = opts[:debug_return_type] || 'CreateUserBadge200Response' + return_type = opts[:debug_return_type] || 'APICreateUserBadgeResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -1646,7 +1646,7 @@ def create_user_badge_with_http_info(tenant_id, create_user_badge_params, opts = # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [VoteComment200Response] + # @return [VoteResponse] def create_vote(tenant_id, comment_id, direction, opts = {}) data, _status_code, _headers = create_vote_with_http_info(tenant_id, comment_id, direction, opts) data @@ -1658,7 +1658,7 @@ def create_vote(tenant_id, comment_id, direction, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [Array<(VoteComment200Response, Integer, Hash)>] VoteComment200Response data, response status code and response headers + # @return [Array<(VoteResponse, Integer, Hash)>] VoteResponse data, response status code and response headers def create_vote_with_http_info(tenant_id, comment_id, direction, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.create_vote ...' @@ -1703,7 +1703,7 @@ def create_vote_with_http_info(tenant_id, comment_id, direction, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'VoteComment200Response' + return_type = opts[:debug_return_type] || 'VoteResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -1730,7 +1730,7 @@ def create_vote_with_http_info(tenant_id, comment_id, direction, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :context_user_id # @option opts [Boolean] :is_live - # @return [DeleteComment200Response] + # @return [DeleteCommentResult] def delete_comment(tenant_id, id, opts = {}) data, _status_code, _headers = delete_comment_with_http_info(tenant_id, id, opts) data @@ -1741,7 +1741,7 @@ def delete_comment(tenant_id, id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :context_user_id # @option opts [Boolean] :is_live - # @return [Array<(DeleteComment200Response, Integer, Hash)>] DeleteComment200Response data, response status code and response headers + # @return [Array<(DeleteCommentResult, Integer, Hash)>] DeleteCommentResult data, response status code and response headers def delete_comment_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.delete_comment ...' @@ -1775,7 +1775,7 @@ def delete_comment_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'DeleteComment200Response' + return_type = opts[:debug_return_type] || 'DeleteCommentResult' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -1800,7 +1800,7 @@ def delete_comment_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param domain [String] # @param [Hash] opts the optional parameters - # @return [DeleteDomainConfig200Response] + # @return [DeleteDomainConfigResponse] def delete_domain_config(tenant_id, domain, opts = {}) data, _status_code, _headers = delete_domain_config_with_http_info(tenant_id, domain, opts) data @@ -1809,7 +1809,7 @@ def delete_domain_config(tenant_id, domain, opts = {}) # @param tenant_id [String] # @param domain [String] # @param [Hash] opts the optional parameters - # @return [Array<(DeleteDomainConfig200Response, Integer, Hash)>] DeleteDomainConfig200Response data, response status code and response headers + # @return [Array<(DeleteDomainConfigResponse, Integer, Hash)>] DeleteDomainConfigResponse data, response status code and response headers def delete_domain_config_with_http_info(tenant_id, domain, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.delete_domain_config ...' @@ -1841,7 +1841,7 @@ def delete_domain_config_with_http_info(tenant_id, domain, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'DeleteDomainConfig200Response' + return_type = opts[:debug_return_type] || 'DeleteDomainConfigResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -1866,7 +1866,7 @@ def delete_domain_config_with_http_info(tenant_id, domain, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def delete_email_template(tenant_id, id, opts = {}) data, _status_code, _headers = delete_email_template_with_http_info(tenant_id, id, opts) data @@ -1875,7 +1875,7 @@ def delete_email_template(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def delete_email_template_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.delete_email_template ...' @@ -1907,7 +1907,7 @@ def delete_email_template_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -1933,7 +1933,7 @@ def delete_email_template_with_http_info(tenant_id, id, opts = {}) # @param id [String] # @param error_id [String] # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def delete_email_template_render_error(tenant_id, id, error_id, opts = {}) data, _status_code, _headers = delete_email_template_render_error_with_http_info(tenant_id, id, error_id, opts) data @@ -1943,7 +1943,7 @@ def delete_email_template_render_error(tenant_id, id, error_id, opts = {}) # @param id [String] # @param error_id [String] # @param [Hash] opts the optional parameters - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def delete_email_template_render_error_with_http_info(tenant_id, id, error_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.delete_email_template_render_error ...' @@ -1979,7 +1979,7 @@ def delete_email_template_render_error_with_http_info(tenant_id, id, error_id, o post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -2004,8 +2004,8 @@ def delete_email_template_render_error_with_http_info(tenant_id, id, error_id, o # @param tag [String] # @param [Hash] opts the optional parameters # @option opts [String] :tenant_id - # @option opts [DeleteHashTagRequest] :delete_hash_tag_request - # @return [FlagCommentPublic200Response] + # @option opts [DeleteHashTagRequestBody] :delete_hash_tag_request_body + # @return [APIEmptyResponse] def delete_hash_tag(tag, opts = {}) data, _status_code, _headers = delete_hash_tag_with_http_info(tag, opts) data @@ -2014,8 +2014,8 @@ def delete_hash_tag(tag, opts = {}) # @param tag [String] # @param [Hash] opts the optional parameters # @option opts [String] :tenant_id - # @option opts [DeleteHashTagRequest] :delete_hash_tag_request - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @option opts [DeleteHashTagRequestBody] :delete_hash_tag_request_body + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def delete_hash_tag_with_http_info(tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.delete_hash_tag ...' @@ -2045,10 +2045,10 @@ def delete_hash_tag_with_http_info(tag, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'delete_hash_tag_request']) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'delete_hash_tag_request_body']) # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -2074,7 +2074,7 @@ def delete_hash_tag_with_http_info(tag, opts = {}) # @param id [String] # @param [Hash] opts the optional parameters # @option opts [String] :send_email - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def delete_moderator(tenant_id, id, opts = {}) data, _status_code, _headers = delete_moderator_with_http_info(tenant_id, id, opts) data @@ -2084,7 +2084,7 @@ def delete_moderator(tenant_id, id, opts = {}) # @param id [String] # @param [Hash] opts the optional parameters # @option opts [String] :send_email - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def delete_moderator_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.delete_moderator ...' @@ -2117,7 +2117,7 @@ def delete_moderator_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -2142,7 +2142,7 @@ def delete_moderator_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def delete_notification_count(tenant_id, id, opts = {}) data, _status_code, _headers = delete_notification_count_with_http_info(tenant_id, id, opts) data @@ -2151,7 +2151,7 @@ def delete_notification_count(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def delete_notification_count_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.delete_notification_count ...' @@ -2183,7 +2183,7 @@ def delete_notification_count_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -2274,7 +2274,7 @@ def delete_page_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def delete_pending_webhook_event(tenant_id, id, opts = {}) data, _status_code, _headers = delete_pending_webhook_event_with_http_info(tenant_id, id, opts) data @@ -2283,7 +2283,7 @@ def delete_pending_webhook_event(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def delete_pending_webhook_event_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.delete_pending_webhook_event ...' @@ -2315,7 +2315,7 @@ def delete_pending_webhook_event_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -2340,7 +2340,7 @@ def delete_pending_webhook_event_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def delete_question_config(tenant_id, id, opts = {}) data, _status_code, _headers = delete_question_config_with_http_info(tenant_id, id, opts) data @@ -2349,7 +2349,7 @@ def delete_question_config(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def delete_question_config_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.delete_question_config ...' @@ -2381,7 +2381,7 @@ def delete_question_config_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -2406,7 +2406,7 @@ def delete_question_config_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def delete_question_result(tenant_id, id, opts = {}) data, _status_code, _headers = delete_question_result_with_http_info(tenant_id, id, opts) data @@ -2415,7 +2415,7 @@ def delete_question_result(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def delete_question_result_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.delete_question_result ...' @@ -2447,7 +2447,7 @@ def delete_question_result_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -2614,7 +2614,7 @@ def delete_subscription_with_http_info(tenant_id, id, opts = {}) # @param id [String] # @param [Hash] opts the optional parameters # @option opts [String] :sure - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def delete_tenant(tenant_id, id, opts = {}) data, _status_code, _headers = delete_tenant_with_http_info(tenant_id, id, opts) data @@ -2624,7 +2624,7 @@ def delete_tenant(tenant_id, id, opts = {}) # @param id [String] # @param [Hash] opts the optional parameters # @option opts [String] :sure - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def delete_tenant_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.delete_tenant ...' @@ -2657,7 +2657,7 @@ def delete_tenant_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -2682,7 +2682,7 @@ def delete_tenant_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def delete_tenant_package(tenant_id, id, opts = {}) data, _status_code, _headers = delete_tenant_package_with_http_info(tenant_id, id, opts) data @@ -2691,7 +2691,7 @@ def delete_tenant_package(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def delete_tenant_package_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.delete_tenant_package ...' @@ -2723,7 +2723,7 @@ def delete_tenant_package_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -2750,7 +2750,7 @@ def delete_tenant_package_with_http_info(tenant_id, id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :delete_comments # @option opts [String] :comment_delete_mode - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def delete_tenant_user(tenant_id, id, opts = {}) data, _status_code, _headers = delete_tenant_user_with_http_info(tenant_id, id, opts) data @@ -2761,7 +2761,7 @@ def delete_tenant_user(tenant_id, id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :delete_comments # @option opts [String] :comment_delete_mode - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def delete_tenant_user_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.delete_tenant_user ...' @@ -2795,7 +2795,7 @@ def delete_tenant_user_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -2820,7 +2820,7 @@ def delete_tenant_user_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [UpdateUserBadge200Response] + # @return [APIEmptySuccessResponse] def delete_user_badge(tenant_id, id, opts = {}) data, _status_code, _headers = delete_user_badge_with_http_info(tenant_id, id, opts) data @@ -2829,7 +2829,7 @@ def delete_user_badge(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(UpdateUserBadge200Response, Integer, Hash)>] UpdateUserBadge200Response data, response status code and response headers + # @return [Array<(APIEmptySuccessResponse, Integer, Hash)>] APIEmptySuccessResponse data, response status code and response headers def delete_user_badge_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.delete_user_badge ...' @@ -2861,7 +2861,7 @@ def delete_user_badge_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'UpdateUserBadge200Response' + return_type = opts[:debug_return_type] || 'APIEmptySuccessResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -2887,7 +2887,7 @@ def delete_user_badge_with_http_info(tenant_id, id, opts = {}) # @param id [String] # @param [Hash] opts the optional parameters # @option opts [String] :edit_key - # @return [DeleteCommentVote200Response] + # @return [VoteDeleteResponse] def delete_vote(tenant_id, id, opts = {}) data, _status_code, _headers = delete_vote_with_http_info(tenant_id, id, opts) data @@ -2897,7 +2897,7 @@ def delete_vote(tenant_id, id, opts = {}) # @param id [String] # @param [Hash] opts the optional parameters # @option opts [String] :edit_key - # @return [Array<(DeleteCommentVote200Response, Integer, Hash)>] DeleteCommentVote200Response data, response status code and response headers + # @return [Array<(VoteDeleteResponse, Integer, Hash)>] VoteDeleteResponse data, response status code and response headers def delete_vote_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.delete_vote ...' @@ -2930,7 +2930,7 @@ def delete_vote_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'DeleteCommentVote200Response' + return_type = opts[:debug_return_type] || 'VoteDeleteResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -2957,7 +2957,7 @@ def delete_vote_with_http_info(tenant_id, id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [FlagComment200Response] + # @return [FlagCommentResponse] def flag_comment(tenant_id, id, opts = {}) data, _status_code, _headers = flag_comment_with_http_info(tenant_id, id, opts) data @@ -2968,7 +2968,7 @@ def flag_comment(tenant_id, id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [Array<(FlagComment200Response, Integer, Hash)>] FlagComment200Response data, response status code and response headers + # @return [Array<(FlagCommentResponse, Integer, Hash)>] FlagCommentResponse data, response status code and response headers def flag_comment_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.flag_comment ...' @@ -3002,7 +3002,7 @@ def flag_comment_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FlagComment200Response' + return_type = opts[:debug_return_type] || 'FlagCommentResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -3031,7 +3031,7 @@ def flag_comment_with_http_info(tenant_id, id, opts = {}) # @option opts [SORTDIR] :order # @option opts [Float] :after # @option opts [Float] :before - # @return [GetAuditLogs200Response] + # @return [GetAuditLogsResponse] def get_audit_logs(tenant_id, opts = {}) data, _status_code, _headers = get_audit_logs_with_http_info(tenant_id, opts) data @@ -3044,7 +3044,7 @@ def get_audit_logs(tenant_id, opts = {}) # @option opts [SORTDIR] :order # @option opts [Float] :after # @option opts [Float] :before - # @return [Array<(GetAuditLogs200Response, Integer, Hash)>] GetAuditLogs200Response data, response status code and response headers + # @return [Array<(GetAuditLogsResponse, Integer, Hash)>] GetAuditLogsResponse data, response status code and response headers def get_audit_logs_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_audit_logs ...' @@ -3077,7 +3077,7 @@ def get_audit_logs_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetAuditLogs200Response' + return_type = opts[:debug_return_type] || 'GetAuditLogsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -3102,7 +3102,7 @@ def get_audit_logs_with_http_info(tenant_id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [GetCachedNotificationCount200Response] + # @return [GetCachedNotificationCountResponse] def get_cached_notification_count(tenant_id, id, opts = {}) data, _status_code, _headers = get_cached_notification_count_with_http_info(tenant_id, id, opts) data @@ -3111,7 +3111,7 @@ def get_cached_notification_count(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetCachedNotificationCount200Response, Integer, Hash)>] GetCachedNotificationCount200Response data, response status code and response headers + # @return [Array<(GetCachedNotificationCountResponse, Integer, Hash)>] GetCachedNotificationCountResponse data, response status code and response headers def get_cached_notification_count_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_cached_notification_count ...' @@ -3143,7 +3143,7 @@ def get_cached_notification_count_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetCachedNotificationCount200Response' + return_type = opts[:debug_return_type] || 'GetCachedNotificationCountResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -3168,7 +3168,7 @@ def get_cached_notification_count_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [GetComment200Response] + # @return [APIGetCommentResponse] def get_comment(tenant_id, id, opts = {}) data, _status_code, _headers = get_comment_with_http_info(tenant_id, id, opts) data @@ -3177,7 +3177,7 @@ def get_comment(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetComment200Response, Integer, Hash)>] GetComment200Response data, response status code and response headers + # @return [Array<(APIGetCommentResponse, Integer, Hash)>] APIGetCommentResponse data, response status code and response headers def get_comment_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_comment ...' @@ -3209,7 +3209,7 @@ def get_comment_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetComment200Response' + return_type = opts[:debug_return_type] || 'APIGetCommentResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -3247,7 +3247,9 @@ def get_comment_with_http_info(tenant_id, id, opts = {}) # @option opts [String] :hash_tag # @option opts [String] :parent_id # @option opts [SortDirections] :direction - # @return [GetComments200Response] + # @option opts [Integer] :from_date + # @option opts [Integer] :to_date + # @return [APIGetCommentsResponse] def get_comments(tenant_id, opts = {}) data, _status_code, _headers = get_comments_with_http_info(tenant_id, opts) data @@ -3269,7 +3271,9 @@ def get_comments(tenant_id, opts = {}) # @option opts [String] :hash_tag # @option opts [String] :parent_id # @option opts [SortDirections] :direction - # @return [Array<(GetComments200Response, Integer, Hash)>] GetComments200Response data, response status code and response headers + # @option opts [Integer] :from_date + # @option opts [Integer] :to_date + # @return [Array<(APIGetCommentsResponse, Integer, Hash)>] APIGetCommentsResponse data, response status code and response headers def get_comments_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_comments ...' @@ -3298,6 +3302,8 @@ def get_comments_with_http_info(tenant_id, opts = {}) query_params[:'hashTag'] = opts[:'hash_tag'] if !opts[:'hash_tag'].nil? query_params[:'parentId'] = opts[:'parent_id'] if !opts[:'parent_id'].nil? query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil? + query_params[:'fromDate'] = opts[:'from_date'] if !opts[:'from_date'].nil? + query_params[:'toDate'] = opts[:'to_date'] if !opts[:'to_date'].nil? # header parameters header_params = opts[:header_params] || {} @@ -3311,7 +3317,7 @@ def get_comments_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetComments200Response' + return_type = opts[:debug_return_type] || 'APIGetCommentsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -3336,7 +3342,7 @@ def get_comments_with_http_info(tenant_id, opts = {}) # @param tenant_id [String] # @param domain [String] # @param [Hash] opts the optional parameters - # @return [GetDomainConfig200Response] + # @return [GetDomainConfigResponse] def get_domain_config(tenant_id, domain, opts = {}) data, _status_code, _headers = get_domain_config_with_http_info(tenant_id, domain, opts) data @@ -3345,7 +3351,7 @@ def get_domain_config(tenant_id, domain, opts = {}) # @param tenant_id [String] # @param domain [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetDomainConfig200Response, Integer, Hash)>] GetDomainConfig200Response data, response status code and response headers + # @return [Array<(GetDomainConfigResponse, Integer, Hash)>] GetDomainConfigResponse data, response status code and response headers def get_domain_config_with_http_info(tenant_id, domain, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_domain_config ...' @@ -3377,7 +3383,7 @@ def get_domain_config_with_http_info(tenant_id, domain, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetDomainConfig200Response' + return_type = opts[:debug_return_type] || 'GetDomainConfigResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -3401,7 +3407,7 @@ def get_domain_config_with_http_info(tenant_id, domain, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters - # @return [GetDomainConfigs200Response] + # @return [GetDomainConfigsResponse] def get_domain_configs(tenant_id, opts = {}) data, _status_code, _headers = get_domain_configs_with_http_info(tenant_id, opts) data @@ -3409,7 +3415,7 @@ def get_domain_configs(tenant_id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetDomainConfigs200Response, Integer, Hash)>] GetDomainConfigs200Response data, response status code and response headers + # @return [Array<(GetDomainConfigsResponse, Integer, Hash)>] GetDomainConfigsResponse data, response status code and response headers def get_domain_configs_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_domain_configs ...' @@ -3437,7 +3443,7 @@ def get_domain_configs_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetDomainConfigs200Response' + return_type = opts[:debug_return_type] || 'GetDomainConfigsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -3462,7 +3468,7 @@ def get_domain_configs_with_http_info(tenant_id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [GetEmailTemplate200Response] + # @return [GetEmailTemplateResponse] def get_email_template(tenant_id, id, opts = {}) data, _status_code, _headers = get_email_template_with_http_info(tenant_id, id, opts) data @@ -3471,7 +3477,7 @@ def get_email_template(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetEmailTemplate200Response, Integer, Hash)>] GetEmailTemplate200Response data, response status code and response headers + # @return [Array<(GetEmailTemplateResponse, Integer, Hash)>] GetEmailTemplateResponse data, response status code and response headers def get_email_template_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_email_template ...' @@ -3503,7 +3509,7 @@ def get_email_template_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetEmailTemplate200Response' + return_type = opts[:debug_return_type] || 'GetEmailTemplateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -3527,7 +3533,7 @@ def get_email_template_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters - # @return [GetEmailTemplateDefinitions200Response] + # @return [GetEmailTemplateDefinitionsResponse] def get_email_template_definitions(tenant_id, opts = {}) data, _status_code, _headers = get_email_template_definitions_with_http_info(tenant_id, opts) data @@ -3535,7 +3541,7 @@ def get_email_template_definitions(tenant_id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetEmailTemplateDefinitions200Response, Integer, Hash)>] GetEmailTemplateDefinitions200Response data, response status code and response headers + # @return [Array<(GetEmailTemplateDefinitionsResponse, Integer, Hash)>] GetEmailTemplateDefinitionsResponse data, response status code and response headers def get_email_template_definitions_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_email_template_definitions ...' @@ -3563,7 +3569,7 @@ def get_email_template_definitions_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetEmailTemplateDefinitions200Response' + return_type = opts[:debug_return_type] || 'GetEmailTemplateDefinitionsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -3589,7 +3595,7 @@ def get_email_template_definitions_with_http_info(tenant_id, opts = {}) # @param id [String] # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [GetEmailTemplateRenderErrors200Response] + # @return [GetEmailTemplateRenderErrorsResponse] def get_email_template_render_errors(tenant_id, id, opts = {}) data, _status_code, _headers = get_email_template_render_errors_with_http_info(tenant_id, id, opts) data @@ -3599,7 +3605,7 @@ def get_email_template_render_errors(tenant_id, id, opts = {}) # @param id [String] # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [Array<(GetEmailTemplateRenderErrors200Response, Integer, Hash)>] GetEmailTemplateRenderErrors200Response data, response status code and response headers + # @return [Array<(GetEmailTemplateRenderErrorsResponse, Integer, Hash)>] GetEmailTemplateRenderErrorsResponse data, response status code and response headers def get_email_template_render_errors_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_email_template_render_errors ...' @@ -3632,7 +3638,7 @@ def get_email_template_render_errors_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetEmailTemplateRenderErrors200Response' + return_type = opts[:debug_return_type] || 'GetEmailTemplateRenderErrorsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -3657,7 +3663,7 @@ def get_email_template_render_errors_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [GetEmailTemplates200Response] + # @return [GetEmailTemplatesResponse] def get_email_templates(tenant_id, opts = {}) data, _status_code, _headers = get_email_templates_with_http_info(tenant_id, opts) data @@ -3666,7 +3672,7 @@ def get_email_templates(tenant_id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [Array<(GetEmailTemplates200Response, Integer, Hash)>] GetEmailTemplates200Response data, response status code and response headers + # @return [Array<(GetEmailTemplatesResponse, Integer, Hash)>] GetEmailTemplatesResponse data, response status code and response headers def get_email_templates_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_email_templates ...' @@ -3695,7 +3701,7 @@ def get_email_templates_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetEmailTemplates200Response' + return_type = opts[:debug_return_type] || 'GetEmailTemplatesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -3723,7 +3729,7 @@ def get_email_templates_with_http_info(tenant_id, opts = {}) # @option opts [String] :after_id # @option opts [Integer] :limit # @option opts [Array] :tags - # @return [GetFeedPosts200Response] + # @return [GetFeedPostsResponse] def get_feed_posts(tenant_id, opts = {}) data, _status_code, _headers = get_feed_posts_with_http_info(tenant_id, opts) data @@ -3735,7 +3741,7 @@ def get_feed_posts(tenant_id, opts = {}) # @option opts [String] :after_id # @option opts [Integer] :limit # @option opts [Array] :tags - # @return [Array<(GetFeedPosts200Response, Integer, Hash)>] GetFeedPosts200Response data, response status code and response headers + # @return [Array<(GetFeedPostsResponse, Integer, Hash)>] GetFeedPostsResponse data, response status code and response headers def get_feed_posts_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_feed_posts ...' @@ -3766,7 +3772,7 @@ def get_feed_posts_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetFeedPosts200Response' + return_type = opts[:debug_return_type] || 'GetFeedPostsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -3791,7 +3797,7 @@ def get_feed_posts_with_http_info(tenant_id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters # @option opts [Float] :page - # @return [GetHashTags200Response] + # @return [GetHashTagsResponse] def get_hash_tags(tenant_id, opts = {}) data, _status_code, _headers = get_hash_tags_with_http_info(tenant_id, opts) data @@ -3800,7 +3806,7 @@ def get_hash_tags(tenant_id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters # @option opts [Float] :page - # @return [Array<(GetHashTags200Response, Integer, Hash)>] GetHashTags200Response data, response status code and response headers + # @return [Array<(GetHashTagsResponse, Integer, Hash)>] GetHashTagsResponse data, response status code and response headers def get_hash_tags_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_hash_tags ...' @@ -3829,7 +3835,7 @@ def get_hash_tags_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetHashTags200Response' + return_type = opts[:debug_return_type] || 'GetHashTagsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -3854,7 +3860,7 @@ def get_hash_tags_with_http_info(tenant_id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [GetModerator200Response] + # @return [GetModeratorResponse] def get_moderator(tenant_id, id, opts = {}) data, _status_code, _headers = get_moderator_with_http_info(tenant_id, id, opts) data @@ -3863,7 +3869,7 @@ def get_moderator(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetModerator200Response, Integer, Hash)>] GetModerator200Response data, response status code and response headers + # @return [Array<(GetModeratorResponse, Integer, Hash)>] GetModeratorResponse data, response status code and response headers def get_moderator_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_moderator ...' @@ -3895,7 +3901,7 @@ def get_moderator_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetModerator200Response' + return_type = opts[:debug_return_type] || 'GetModeratorResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -3920,7 +3926,7 @@ def get_moderator_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [GetModerators200Response] + # @return [GetModeratorsResponse] def get_moderators(tenant_id, opts = {}) data, _status_code, _headers = get_moderators_with_http_info(tenant_id, opts) data @@ -3929,7 +3935,7 @@ def get_moderators(tenant_id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [Array<(GetModerators200Response, Integer, Hash)>] GetModerators200Response data, response status code and response headers + # @return [Array<(GetModeratorsResponse, Integer, Hash)>] GetModeratorsResponse data, response status code and response headers def get_moderators_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_moderators ...' @@ -3958,7 +3964,7 @@ def get_moderators_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetModerators200Response' + return_type = opts[:debug_return_type] || 'GetModeratorsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -3987,7 +3993,7 @@ def get_moderators_with_http_info(tenant_id, opts = {}) # @option opts [String] :from_comment_id # @option opts [Boolean] :viewed # @option opts [String] :type - # @return [GetNotificationCount200Response] + # @return [GetNotificationCountResponse] def get_notification_count(tenant_id, opts = {}) data, _status_code, _headers = get_notification_count_with_http_info(tenant_id, opts) data @@ -4000,7 +4006,7 @@ def get_notification_count(tenant_id, opts = {}) # @option opts [String] :from_comment_id # @option opts [Boolean] :viewed # @option opts [String] :type - # @return [Array<(GetNotificationCount200Response, Integer, Hash)>] GetNotificationCount200Response data, response status code and response headers + # @return [Array<(GetNotificationCountResponse, Integer, Hash)>] GetNotificationCountResponse data, response status code and response headers def get_notification_count_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_notification_count ...' @@ -4033,7 +4039,7 @@ def get_notification_count_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetNotificationCount200Response' + return_type = opts[:debug_return_type] || 'GetNotificationCountResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -4063,7 +4069,7 @@ def get_notification_count_with_http_info(tenant_id, opts = {}) # @option opts [Boolean] :viewed # @option opts [String] :type # @option opts [Float] :skip - # @return [GetNotifications200Response] + # @return [GetNotificationsResponse] def get_notifications(tenant_id, opts = {}) data, _status_code, _headers = get_notifications_with_http_info(tenant_id, opts) data @@ -4077,7 +4083,7 @@ def get_notifications(tenant_id, opts = {}) # @option opts [Boolean] :viewed # @option opts [String] :type # @option opts [Float] :skip - # @return [Array<(GetNotifications200Response, Integer, Hash)>] GetNotifications200Response data, response status code and response headers + # @return [Array<(GetNotificationsResponse, Integer, Hash)>] GetNotificationsResponse data, response status code and response headers def get_notifications_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_notifications ...' @@ -4111,7 +4117,7 @@ def get_notifications_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetNotifications200Response' + return_type = opts[:debug_return_type] || 'GetNotificationsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -4268,7 +4274,7 @@ def get_pages_with_http_info(tenant_id, opts = {}) # @option opts [String] :type # @option opts [String] :domain # @option opts [Float] :attempt_count_gt - # @return [GetPendingWebhookEventCount200Response] + # @return [GetPendingWebhookEventCountResponse] def get_pending_webhook_event_count(tenant_id, opts = {}) data, _status_code, _headers = get_pending_webhook_event_count_with_http_info(tenant_id, opts) data @@ -4282,7 +4288,7 @@ def get_pending_webhook_event_count(tenant_id, opts = {}) # @option opts [String] :type # @option opts [String] :domain # @option opts [Float] :attempt_count_gt - # @return [Array<(GetPendingWebhookEventCount200Response, Integer, Hash)>] GetPendingWebhookEventCount200Response data, response status code and response headers + # @return [Array<(GetPendingWebhookEventCountResponse, Integer, Hash)>] GetPendingWebhookEventCountResponse data, response status code and response headers def get_pending_webhook_event_count_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_pending_webhook_event_count ...' @@ -4316,7 +4322,7 @@ def get_pending_webhook_event_count_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetPendingWebhookEventCount200Response' + return_type = opts[:debug_return_type] || 'GetPendingWebhookEventCountResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -4347,7 +4353,7 @@ def get_pending_webhook_event_count_with_http_info(tenant_id, opts = {}) # @option opts [String] :domain # @option opts [Float] :attempt_count_gt # @option opts [Float] :skip - # @return [GetPendingWebhookEvents200Response] + # @return [GetPendingWebhookEventsResponse] def get_pending_webhook_events(tenant_id, opts = {}) data, _status_code, _headers = get_pending_webhook_events_with_http_info(tenant_id, opts) data @@ -4362,7 +4368,7 @@ def get_pending_webhook_events(tenant_id, opts = {}) # @option opts [String] :domain # @option opts [Float] :attempt_count_gt # @option opts [Float] :skip - # @return [Array<(GetPendingWebhookEvents200Response, Integer, Hash)>] GetPendingWebhookEvents200Response data, response status code and response headers + # @return [Array<(GetPendingWebhookEventsResponse, Integer, Hash)>] GetPendingWebhookEventsResponse data, response status code and response headers def get_pending_webhook_events_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_pending_webhook_events ...' @@ -4397,7 +4403,7 @@ def get_pending_webhook_events_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetPendingWebhookEvents200Response' + return_type = opts[:debug_return_type] || 'GetPendingWebhookEventsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -4422,7 +4428,7 @@ def get_pending_webhook_events_with_http_info(tenant_id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [GetQuestionConfig200Response] + # @return [GetQuestionConfigResponse] def get_question_config(tenant_id, id, opts = {}) data, _status_code, _headers = get_question_config_with_http_info(tenant_id, id, opts) data @@ -4431,7 +4437,7 @@ def get_question_config(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetQuestionConfig200Response, Integer, Hash)>] GetQuestionConfig200Response data, response status code and response headers + # @return [Array<(GetQuestionConfigResponse, Integer, Hash)>] GetQuestionConfigResponse data, response status code and response headers def get_question_config_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_question_config ...' @@ -4463,7 +4469,7 @@ def get_question_config_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetQuestionConfig200Response' + return_type = opts[:debug_return_type] || 'GetQuestionConfigResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -4488,7 +4494,7 @@ def get_question_config_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [GetQuestionConfigs200Response] + # @return [GetQuestionConfigsResponse] def get_question_configs(tenant_id, opts = {}) data, _status_code, _headers = get_question_configs_with_http_info(tenant_id, opts) data @@ -4497,7 +4503,7 @@ def get_question_configs(tenant_id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [Array<(GetQuestionConfigs200Response, Integer, Hash)>] GetQuestionConfigs200Response data, response status code and response headers + # @return [Array<(GetQuestionConfigsResponse, Integer, Hash)>] GetQuestionConfigsResponse data, response status code and response headers def get_question_configs_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_question_configs ...' @@ -4526,7 +4532,7 @@ def get_question_configs_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetQuestionConfigs200Response' + return_type = opts[:debug_return_type] || 'GetQuestionConfigsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -4551,7 +4557,7 @@ def get_question_configs_with_http_info(tenant_id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [GetQuestionResult200Response] + # @return [GetQuestionResultResponse] def get_question_result(tenant_id, id, opts = {}) data, _status_code, _headers = get_question_result_with_http_info(tenant_id, id, opts) data @@ -4560,7 +4566,7 @@ def get_question_result(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetQuestionResult200Response, Integer, Hash)>] GetQuestionResult200Response data, response status code and response headers + # @return [Array<(GetQuestionResultResponse, Integer, Hash)>] GetQuestionResultResponse data, response status code and response headers def get_question_result_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_question_result ...' @@ -4592,7 +4598,7 @@ def get_question_result_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetQuestionResult200Response' + return_type = opts[:debug_return_type] || 'GetQuestionResultResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -4622,7 +4628,7 @@ def get_question_result_with_http_info(tenant_id, id, opts = {}) # @option opts [String] :question_id # @option opts [String] :question_ids # @option opts [Float] :skip - # @return [GetQuestionResults200Response] + # @return [GetQuestionResultsResponse] def get_question_results(tenant_id, opts = {}) data, _status_code, _headers = get_question_results_with_http_info(tenant_id, opts) data @@ -4636,7 +4642,7 @@ def get_question_results(tenant_id, opts = {}) # @option opts [String] :question_id # @option opts [String] :question_ids # @option opts [Float] :skip - # @return [Array<(GetQuestionResults200Response, Integer, Hash)>] GetQuestionResults200Response data, response status code and response headers + # @return [Array<(GetQuestionResultsResponse, Integer, Hash)>] GetQuestionResultsResponse data, response status code and response headers def get_question_results_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_question_results ...' @@ -4670,7 +4676,7 @@ def get_question_results_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetQuestionResults200Response' + return_type = opts[:debug_return_type] || 'GetQuestionResultsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -4827,7 +4833,7 @@ def get_sso_user_by_id_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters # @option opts [Integer] :skip - # @return [GetSSOUsers200Response] + # @return [GetSSOUsersResponse] def get_sso_users(tenant_id, opts = {}) data, _status_code, _headers = get_sso_users_with_http_info(tenant_id, opts) data @@ -4836,7 +4842,7 @@ def get_sso_users(tenant_id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters # @option opts [Integer] :skip - # @return [Array<(GetSSOUsers200Response, Integer, Hash)>] GetSSOUsers200Response data, response status code and response headers + # @return [Array<(GetSSOUsersResponse, Integer, Hash)>] GetSSOUsersResponse data, response status code and response headers def get_sso_users_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_sso_users ...' @@ -4865,7 +4871,7 @@ def get_sso_users_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetSSOUsers200Response' + return_type = opts[:debug_return_type] || 'GetSSOUsersResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -4953,7 +4959,7 @@ def get_subscriptions_with_http_info(tenant_id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [GetTenant200Response] + # @return [GetTenantResponse] def get_tenant(tenant_id, id, opts = {}) data, _status_code, _headers = get_tenant_with_http_info(tenant_id, id, opts) data @@ -4962,7 +4968,7 @@ def get_tenant(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetTenant200Response, Integer, Hash)>] GetTenant200Response data, response status code and response headers + # @return [Array<(GetTenantResponse, Integer, Hash)>] GetTenantResponse data, response status code and response headers def get_tenant_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_tenant ...' @@ -4994,7 +5000,7 @@ def get_tenant_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetTenant200Response' + return_type = opts[:debug_return_type] || 'GetTenantResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -5022,7 +5028,7 @@ def get_tenant_with_http_info(tenant_id, id, opts = {}) # @option opts [Float] :month_number # @option opts [Float] :day_number # @option opts [Float] :skip - # @return [GetTenantDailyUsages200Response] + # @return [GetTenantDailyUsagesResponse] def get_tenant_daily_usages(tenant_id, opts = {}) data, _status_code, _headers = get_tenant_daily_usages_with_http_info(tenant_id, opts) data @@ -5034,7 +5040,7 @@ def get_tenant_daily_usages(tenant_id, opts = {}) # @option opts [Float] :month_number # @option opts [Float] :day_number # @option opts [Float] :skip - # @return [Array<(GetTenantDailyUsages200Response, Integer, Hash)>] GetTenantDailyUsages200Response data, response status code and response headers + # @return [Array<(GetTenantDailyUsagesResponse, Integer, Hash)>] GetTenantDailyUsagesResponse data, response status code and response headers def get_tenant_daily_usages_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_tenant_daily_usages ...' @@ -5066,7 +5072,7 @@ def get_tenant_daily_usages_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetTenantDailyUsages200Response' + return_type = opts[:debug_return_type] || 'GetTenantDailyUsagesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -5091,7 +5097,7 @@ def get_tenant_daily_usages_with_http_info(tenant_id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [GetTenantPackage200Response] + # @return [GetTenantPackageResponse] def get_tenant_package(tenant_id, id, opts = {}) data, _status_code, _headers = get_tenant_package_with_http_info(tenant_id, id, opts) data @@ -5100,7 +5106,7 @@ def get_tenant_package(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetTenantPackage200Response, Integer, Hash)>] GetTenantPackage200Response data, response status code and response headers + # @return [Array<(GetTenantPackageResponse, Integer, Hash)>] GetTenantPackageResponse data, response status code and response headers def get_tenant_package_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_tenant_package ...' @@ -5132,7 +5138,7 @@ def get_tenant_package_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetTenantPackage200Response' + return_type = opts[:debug_return_type] || 'GetTenantPackageResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -5157,7 +5163,7 @@ def get_tenant_package_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [GetTenantPackages200Response] + # @return [GetTenantPackagesResponse] def get_tenant_packages(tenant_id, opts = {}) data, _status_code, _headers = get_tenant_packages_with_http_info(tenant_id, opts) data @@ -5166,7 +5172,7 @@ def get_tenant_packages(tenant_id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [Array<(GetTenantPackages200Response, Integer, Hash)>] GetTenantPackages200Response data, response status code and response headers + # @return [Array<(GetTenantPackagesResponse, Integer, Hash)>] GetTenantPackagesResponse data, response status code and response headers def get_tenant_packages_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_tenant_packages ...' @@ -5195,7 +5201,7 @@ def get_tenant_packages_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetTenantPackages200Response' + return_type = opts[:debug_return_type] || 'GetTenantPackagesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -5220,7 +5226,7 @@ def get_tenant_packages_with_http_info(tenant_id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [GetTenantUser200Response] + # @return [GetTenantUserResponse] def get_tenant_user(tenant_id, id, opts = {}) data, _status_code, _headers = get_tenant_user_with_http_info(tenant_id, id, opts) data @@ -5229,7 +5235,7 @@ def get_tenant_user(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetTenantUser200Response, Integer, Hash)>] GetTenantUser200Response data, response status code and response headers + # @return [Array<(GetTenantUserResponse, Integer, Hash)>] GetTenantUserResponse data, response status code and response headers def get_tenant_user_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_tenant_user ...' @@ -5261,7 +5267,7 @@ def get_tenant_user_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetTenantUser200Response' + return_type = opts[:debug_return_type] || 'GetTenantUserResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -5286,7 +5292,7 @@ def get_tenant_user_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [GetTenantUsers200Response] + # @return [GetTenantUsersResponse] def get_tenant_users(tenant_id, opts = {}) data, _status_code, _headers = get_tenant_users_with_http_info(tenant_id, opts) data @@ -5295,7 +5301,7 @@ def get_tenant_users(tenant_id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [Array<(GetTenantUsers200Response, Integer, Hash)>] GetTenantUsers200Response data, response status code and response headers + # @return [Array<(GetTenantUsersResponse, Integer, Hash)>] GetTenantUsersResponse data, response status code and response headers def get_tenant_users_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_tenant_users ...' @@ -5324,7 +5330,7 @@ def get_tenant_users_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetTenantUsers200Response' + return_type = opts[:debug_return_type] || 'GetTenantUsersResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -5350,7 +5356,7 @@ def get_tenant_users_with_http_info(tenant_id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :meta # @option opts [Float] :skip - # @return [GetTenants200Response] + # @return [GetTenantsResponse] def get_tenants(tenant_id, opts = {}) data, _status_code, _headers = get_tenants_with_http_info(tenant_id, opts) data @@ -5360,7 +5366,7 @@ def get_tenants(tenant_id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :meta # @option opts [Float] :skip - # @return [Array<(GetTenants200Response, Integer, Hash)>] GetTenants200Response data, response status code and response headers + # @return [Array<(GetTenantsResponse, Integer, Hash)>] GetTenantsResponse data, response status code and response headers def get_tenants_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_tenants ...' @@ -5390,7 +5396,7 @@ def get_tenants_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetTenants200Response' + return_type = opts[:debug_return_type] || 'GetTenantsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -5416,7 +5422,7 @@ def get_tenants_with_http_info(tenant_id, opts = {}) # @param id [String] # @param [Hash] opts the optional parameters # @option opts [String] :user_id - # @return [GetTicket200Response] + # @return [GetTicketResponse] def get_ticket(tenant_id, id, opts = {}) data, _status_code, _headers = get_ticket_with_http_info(tenant_id, id, opts) data @@ -5426,7 +5432,7 @@ def get_ticket(tenant_id, id, opts = {}) # @param id [String] # @param [Hash] opts the optional parameters # @option opts [String] :user_id - # @return [Array<(GetTicket200Response, Integer, Hash)>] GetTicket200Response data, response status code and response headers + # @return [Array<(GetTicketResponse, Integer, Hash)>] GetTicketResponse data, response status code and response headers def get_ticket_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_ticket ...' @@ -5459,7 +5465,7 @@ def get_ticket_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetTicket200Response' + return_type = opts[:debug_return_type] || 'GetTicketResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -5487,7 +5493,7 @@ def get_ticket_with_http_info(tenant_id, id, opts = {}) # @option opts [Float] :state # @option opts [Float] :skip # @option opts [Float] :limit - # @return [GetTickets200Response] + # @return [GetTicketsResponse] def get_tickets(tenant_id, opts = {}) data, _status_code, _headers = get_tickets_with_http_info(tenant_id, opts) data @@ -5499,7 +5505,7 @@ def get_tickets(tenant_id, opts = {}) # @option opts [Float] :state # @option opts [Float] :skip # @option opts [Float] :limit - # @return [Array<(GetTickets200Response, Integer, Hash)>] GetTickets200Response data, response status code and response headers + # @return [Array<(GetTicketsResponse, Integer, Hash)>] GetTicketsResponse data, response status code and response headers def get_tickets_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_tickets ...' @@ -5531,7 +5537,7 @@ def get_tickets_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetTickets200Response' + return_type = opts[:debug_return_type] || 'GetTicketsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -5556,7 +5562,7 @@ def get_tickets_with_http_info(tenant_id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [GetUser200Response] + # @return [GetUserResponse] def get_user(tenant_id, id, opts = {}) data, _status_code, _headers = get_user_with_http_info(tenant_id, id, opts) data @@ -5565,7 +5571,7 @@ def get_user(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetUser200Response, Integer, Hash)>] GetUser200Response data, response status code and response headers + # @return [Array<(GetUserResponse, Integer, Hash)>] GetUserResponse data, response status code and response headers def get_user_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_user ...' @@ -5597,7 +5603,7 @@ def get_user_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetUser200Response' + return_type = opts[:debug_return_type] || 'GetUserResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -5622,7 +5628,7 @@ def get_user_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [GetUserBadge200Response] + # @return [APIGetUserBadgeResponse] def get_user_badge(tenant_id, id, opts = {}) data, _status_code, _headers = get_user_badge_with_http_info(tenant_id, id, opts) data @@ -5631,7 +5637,7 @@ def get_user_badge(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetUserBadge200Response, Integer, Hash)>] GetUserBadge200Response data, response status code and response headers + # @return [Array<(APIGetUserBadgeResponse, Integer, Hash)>] APIGetUserBadgeResponse data, response status code and response headers def get_user_badge_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_user_badge ...' @@ -5663,7 +5669,7 @@ def get_user_badge_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetUserBadge200Response' + return_type = opts[:debug_return_type] || 'APIGetUserBadgeResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -5688,7 +5694,7 @@ def get_user_badge_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [GetUserBadgeProgressById200Response] + # @return [APIGetUserBadgeProgressResponse] def get_user_badge_progress_by_id(tenant_id, id, opts = {}) data, _status_code, _headers = get_user_badge_progress_by_id_with_http_info(tenant_id, id, opts) data @@ -5697,7 +5703,7 @@ def get_user_badge_progress_by_id(tenant_id, id, opts = {}) # @param tenant_id [String] # @param id [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetUserBadgeProgressById200Response, Integer, Hash)>] GetUserBadgeProgressById200Response data, response status code and response headers + # @return [Array<(APIGetUserBadgeProgressResponse, Integer, Hash)>] APIGetUserBadgeProgressResponse data, response status code and response headers def get_user_badge_progress_by_id_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_user_badge_progress_by_id ...' @@ -5729,7 +5735,7 @@ def get_user_badge_progress_by_id_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetUserBadgeProgressById200Response' + return_type = opts[:debug_return_type] || 'APIGetUserBadgeProgressResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -5754,7 +5760,7 @@ def get_user_badge_progress_by_id_with_http_info(tenant_id, id, opts = {}) # @param tenant_id [String] # @param user_id [String] # @param [Hash] opts the optional parameters - # @return [GetUserBadgeProgressById200Response] + # @return [APIGetUserBadgeProgressResponse] def get_user_badge_progress_by_user_id(tenant_id, user_id, opts = {}) data, _status_code, _headers = get_user_badge_progress_by_user_id_with_http_info(tenant_id, user_id, opts) data @@ -5763,7 +5769,7 @@ def get_user_badge_progress_by_user_id(tenant_id, user_id, opts = {}) # @param tenant_id [String] # @param user_id [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetUserBadgeProgressById200Response, Integer, Hash)>] GetUserBadgeProgressById200Response data, response status code and response headers + # @return [Array<(APIGetUserBadgeProgressResponse, Integer, Hash)>] APIGetUserBadgeProgressResponse data, response status code and response headers def get_user_badge_progress_by_user_id_with_http_info(tenant_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_user_badge_progress_by_user_id ...' @@ -5795,7 +5801,7 @@ def get_user_badge_progress_by_user_id_with_http_info(tenant_id, user_id, opts = post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetUserBadgeProgressById200Response' + return_type = opts[:debug_return_type] || 'APIGetUserBadgeProgressResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -5822,7 +5828,7 @@ def get_user_badge_progress_by_user_id_with_http_info(tenant_id, user_id, opts = # @option opts [String] :user_id # @option opts [Float] :limit # @option opts [Float] :skip - # @return [GetUserBadgeProgressList200Response] + # @return [APIGetUserBadgeProgressListResponse] def get_user_badge_progress_list(tenant_id, opts = {}) data, _status_code, _headers = get_user_badge_progress_list_with_http_info(tenant_id, opts) data @@ -5833,7 +5839,7 @@ def get_user_badge_progress_list(tenant_id, opts = {}) # @option opts [String] :user_id # @option opts [Float] :limit # @option opts [Float] :skip - # @return [Array<(GetUserBadgeProgressList200Response, Integer, Hash)>] GetUserBadgeProgressList200Response data, response status code and response headers + # @return [Array<(APIGetUserBadgeProgressListResponse, Integer, Hash)>] APIGetUserBadgeProgressListResponse data, response status code and response headers def get_user_badge_progress_list_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_user_badge_progress_list ...' @@ -5864,7 +5870,7 @@ def get_user_badge_progress_list_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetUserBadgeProgressList200Response' + return_type = opts[:debug_return_type] || 'APIGetUserBadgeProgressListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -5894,7 +5900,7 @@ def get_user_badge_progress_list_with_http_info(tenant_id, opts = {}) # @option opts [Boolean] :displayed_on_comments # @option opts [Float] :limit # @option opts [Float] :skip - # @return [GetUserBadges200Response] + # @return [APIGetUserBadgesResponse] def get_user_badges(tenant_id, opts = {}) data, _status_code, _headers = get_user_badges_with_http_info(tenant_id, opts) data @@ -5908,7 +5914,7 @@ def get_user_badges(tenant_id, opts = {}) # @option opts [Boolean] :displayed_on_comments # @option opts [Float] :limit # @option opts [Float] :skip - # @return [Array<(GetUserBadges200Response, Integer, Hash)>] GetUserBadges200Response data, response status code and response headers + # @return [Array<(APIGetUserBadgesResponse, Integer, Hash)>] APIGetUserBadgesResponse data, response status code and response headers def get_user_badges_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_user_badges ...' @@ -5942,7 +5948,7 @@ def get_user_badges_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetUserBadges200Response' + return_type = opts[:debug_return_type] || 'APIGetUserBadgesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -5967,7 +5973,7 @@ def get_user_badges_with_http_info(tenant_id, opts = {}) # @param tenant_id [String] # @param url_id [String] # @param [Hash] opts the optional parameters - # @return [GetVotes200Response] + # @return [GetVotesResponse] def get_votes(tenant_id, url_id, opts = {}) data, _status_code, _headers = get_votes_with_http_info(tenant_id, url_id, opts) data @@ -5976,7 +5982,7 @@ def get_votes(tenant_id, url_id, opts = {}) # @param tenant_id [String] # @param url_id [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetVotes200Response, Integer, Hash)>] GetVotes200Response data, response status code and response headers + # @return [Array<(GetVotesResponse, Integer, Hash)>] GetVotesResponse data, response status code and response headers def get_votes_with_http_info(tenant_id, url_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_votes ...' @@ -6009,7 +6015,7 @@ def get_votes_with_http_info(tenant_id, url_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetVotes200Response' + return_type = opts[:debug_return_type] || 'GetVotesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -6036,7 +6042,7 @@ def get_votes_with_http_info(tenant_id, url_id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [GetVotesForUser200Response] + # @return [GetVotesForUserResponse] def get_votes_for_user(tenant_id, url_id, opts = {}) data, _status_code, _headers = get_votes_for_user_with_http_info(tenant_id, url_id, opts) data @@ -6047,7 +6053,7 @@ def get_votes_for_user(tenant_id, url_id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [Array<(GetVotesForUser200Response, Integer, Hash)>] GetVotesForUser200Response data, response status code and response headers + # @return [Array<(GetVotesForUserResponse, Integer, Hash)>] GetVotesForUserResponse data, response status code and response headers def get_votes_for_user_with_http_info(tenant_id, url_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_votes_for_user ...' @@ -6082,7 +6088,7 @@ def get_votes_for_user_with_http_info(tenant_id, url_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetVotesForUser200Response' + return_type = opts[:debug_return_type] || 'GetVotesForUserResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -6108,7 +6114,7 @@ def get_votes_for_user_with_http_info(tenant_id, url_id, opts = {}) # @param domain_to_update [String] # @param patch_domain_config_params [PatchDomainConfigParams] # @param [Hash] opts the optional parameters - # @return [GetDomainConfig200Response] + # @return [PatchDomainConfigResponse] def patch_domain_config(tenant_id, domain_to_update, patch_domain_config_params, opts = {}) data, _status_code, _headers = patch_domain_config_with_http_info(tenant_id, domain_to_update, patch_domain_config_params, opts) data @@ -6118,7 +6124,7 @@ def patch_domain_config(tenant_id, domain_to_update, patch_domain_config_params, # @param domain_to_update [String] # @param patch_domain_config_params [PatchDomainConfigParams] # @param [Hash] opts the optional parameters - # @return [Array<(GetDomainConfig200Response, Integer, Hash)>] GetDomainConfig200Response data, response status code and response headers + # @return [Array<(PatchDomainConfigResponse, Integer, Hash)>] PatchDomainConfigResponse data, response status code and response headers def patch_domain_config_with_http_info(tenant_id, domain_to_update, patch_domain_config_params, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.patch_domain_config ...' @@ -6159,7 +6165,7 @@ def patch_domain_config_with_http_info(tenant_id, domain_to_update, patch_domain post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_domain_config_params) # return_type - return_type = opts[:debug_return_type] || 'GetDomainConfig200Response' + return_type = opts[:debug_return_type] || 'PatchDomainConfigResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -6185,7 +6191,7 @@ def patch_domain_config_with_http_info(tenant_id, domain_to_update, patch_domain # @param [Hash] opts the optional parameters # @option opts [String] :tenant_id # @option opts [UpdateHashTagBody] :update_hash_tag_body - # @return [PatchHashTag200Response] + # @return [UpdateHashTagResponse] def patch_hash_tag(tag, opts = {}) data, _status_code, _headers = patch_hash_tag_with_http_info(tag, opts) data @@ -6195,7 +6201,7 @@ def patch_hash_tag(tag, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :tenant_id # @option opts [UpdateHashTagBody] :update_hash_tag_body - # @return [Array<(PatchHashTag200Response, Integer, Hash)>] PatchHashTag200Response data, response status code and response headers + # @return [Array<(UpdateHashTagResponse, Integer, Hash)>] UpdateHashTagResponse data, response status code and response headers def patch_hash_tag_with_http_info(tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.patch_hash_tag ...' @@ -6228,7 +6234,7 @@ def patch_hash_tag_with_http_info(tag, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_hash_tag_body']) # return_type - return_type = opts[:debug_return_type] || 'PatchHashTag200Response' + return_type = opts[:debug_return_type] || 'UpdateHashTagResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -6411,7 +6417,7 @@ def patch_sso_user_with_http_info(tenant_id, id, update_apisso_user_data, opts = # @param domain_to_update [String] # @param update_domain_config_params [UpdateDomainConfigParams] # @param [Hash] opts the optional parameters - # @return [GetDomainConfig200Response] + # @return [PutDomainConfigResponse] def put_domain_config(tenant_id, domain_to_update, update_domain_config_params, opts = {}) data, _status_code, _headers = put_domain_config_with_http_info(tenant_id, domain_to_update, update_domain_config_params, opts) data @@ -6421,7 +6427,7 @@ def put_domain_config(tenant_id, domain_to_update, update_domain_config_params, # @param domain_to_update [String] # @param update_domain_config_params [UpdateDomainConfigParams] # @param [Hash] opts the optional parameters - # @return [Array<(GetDomainConfig200Response, Integer, Hash)>] GetDomainConfig200Response data, response status code and response headers + # @return [Array<(PutDomainConfigResponse, Integer, Hash)>] PutDomainConfigResponse data, response status code and response headers def put_domain_config_with_http_info(tenant_id, domain_to_update, update_domain_config_params, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.put_domain_config ...' @@ -6462,7 +6468,7 @@ def put_domain_config_with_http_info(tenant_id, domain_to_update, update_domain_ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_domain_config_params) # return_type - return_type = opts[:debug_return_type] || 'GetDomainConfig200Response' + return_type = opts[:debug_return_type] || 'PutDomainConfigResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -6568,7 +6574,7 @@ def put_sso_user_with_http_info(tenant_id, id, update_apisso_user_data, opts = { # @param render_email_template_body [RenderEmailTemplateBody] # @param [Hash] opts the optional parameters # @option opts [String] :locale - # @return [RenderEmailTemplate200Response] + # @return [RenderEmailTemplateResponse] def render_email_template(tenant_id, render_email_template_body, opts = {}) data, _status_code, _headers = render_email_template_with_http_info(tenant_id, render_email_template_body, opts) data @@ -6578,7 +6584,7 @@ def render_email_template(tenant_id, render_email_template_body, opts = {}) # @param render_email_template_body [RenderEmailTemplateBody] # @param [Hash] opts the optional parameters # @option opts [String] :locale - # @return [Array<(RenderEmailTemplate200Response, Integer, Hash)>] RenderEmailTemplate200Response data, response status code and response headers + # @return [Array<(RenderEmailTemplateResponse, Integer, Hash)>] RenderEmailTemplateResponse data, response status code and response headers def render_email_template_with_http_info(tenant_id, render_email_template_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.render_email_template ...' @@ -6616,7 +6622,7 @@ def render_email_template_with_http_info(tenant_id, render_email_template_body, post_body = opts[:debug_body] || @api_client.object_to_http_body(render_email_template_body) # return_type - return_type = opts[:debug_return_type] || 'RenderEmailTemplate200Response' + return_type = opts[:debug_return_type] || 'RenderEmailTemplateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -6642,7 +6648,7 @@ def render_email_template_with_http_info(tenant_id, render_email_template_body, # @param id [String] # @param replace_tenant_package_body [ReplaceTenantPackageBody] # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def replace_tenant_package(tenant_id, id, replace_tenant_package_body, opts = {}) data, _status_code, _headers = replace_tenant_package_with_http_info(tenant_id, id, replace_tenant_package_body, opts) data @@ -6652,7 +6658,7 @@ def replace_tenant_package(tenant_id, id, replace_tenant_package_body, opts = {} # @param id [String] # @param replace_tenant_package_body [ReplaceTenantPackageBody] # @param [Hash] opts the optional parameters - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def replace_tenant_package_with_http_info(tenant_id, id, replace_tenant_package_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.replace_tenant_package ...' @@ -6693,7 +6699,7 @@ def replace_tenant_package_with_http_info(tenant_id, id, replace_tenant_package_ post_body = opts[:debug_body] || @api_client.object_to_http_body(replace_tenant_package_body) # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -6720,7 +6726,7 @@ def replace_tenant_package_with_http_info(tenant_id, id, replace_tenant_package_ # @param replace_tenant_user_body [ReplaceTenantUserBody] # @param [Hash] opts the optional parameters # @option opts [String] :update_comments - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def replace_tenant_user(tenant_id, id, replace_tenant_user_body, opts = {}) data, _status_code, _headers = replace_tenant_user_with_http_info(tenant_id, id, replace_tenant_user_body, opts) data @@ -6731,7 +6737,7 @@ def replace_tenant_user(tenant_id, id, replace_tenant_user_body, opts = {}) # @param replace_tenant_user_body [ReplaceTenantUserBody] # @param [Hash] opts the optional parameters # @option opts [String] :update_comments - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def replace_tenant_user_with_http_info(tenant_id, id, replace_tenant_user_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.replace_tenant_user ...' @@ -6773,7 +6779,7 @@ def replace_tenant_user_with_http_info(tenant_id, id, replace_tenant_user_body, post_body = opts[:debug_body] || @api_client.object_to_http_body(replace_tenant_user_body) # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -6802,7 +6808,7 @@ def replace_tenant_user_with_http_info(tenant_id, id, replace_tenant_user_body, # @option opts [Boolean] :do_spam_check # @option opts [Boolean] :send_emails # @option opts [Boolean] :populate_notifications - # @return [SaveComment200Response] + # @return [APISaveCommentResponse] def save_comment(tenant_id, create_comment_params, opts = {}) data, _status_code, _headers = save_comment_with_http_info(tenant_id, create_comment_params, opts) data @@ -6815,7 +6821,7 @@ def save_comment(tenant_id, create_comment_params, opts = {}) # @option opts [Boolean] :do_spam_check # @option opts [Boolean] :send_emails # @option opts [Boolean] :populate_notifications - # @return [Array<(SaveComment200Response, Integer, Hash)>] SaveComment200Response data, response status code and response headers + # @return [Array<(APISaveCommentResponse, Integer, Hash)>] APISaveCommentResponse data, response status code and response headers def save_comment_with_http_info(tenant_id, create_comment_params, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.save_comment ...' @@ -6856,7 +6862,7 @@ def save_comment_with_http_info(tenant_id, create_comment_params, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_comment_params) # return_type - return_type = opts[:debug_return_type] || 'SaveComment200Response' + return_type = opts[:debug_return_type] || 'APISaveCommentResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -6885,7 +6891,7 @@ def save_comment_with_http_info(tenant_id, create_comment_params, opts = {}) # @option opts [Boolean] :do_spam_check # @option opts [Boolean] :send_emails # @option opts [Boolean] :populate_notifications - # @return [Array] + # @return [Array] def save_comments_bulk(tenant_id, create_comment_params, opts = {}) data, _status_code, _headers = save_comments_bulk_with_http_info(tenant_id, create_comment_params, opts) data @@ -6898,7 +6904,7 @@ def save_comments_bulk(tenant_id, create_comment_params, opts = {}) # @option opts [Boolean] :do_spam_check # @option opts [Boolean] :send_emails # @option opts [Boolean] :populate_notifications - # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def save_comments_bulk_with_http_info(tenant_id, create_comment_params, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.save_comments_bulk ...' @@ -6939,7 +6945,7 @@ def save_comments_bulk_with_http_info(tenant_id, create_comment_params, opts = { post_body = opts[:debug_body] || @api_client.object_to_http_body(create_comment_params) # return_type - return_type = opts[:debug_return_type] || 'Array' + return_type = opts[:debug_return_type] || 'Array' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -6965,7 +6971,7 @@ def save_comments_bulk_with_http_info(tenant_id, create_comment_params, opts = { # @param id [String] # @param from_name [String] # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def send_invite(tenant_id, id, from_name, opts = {}) data, _status_code, _headers = send_invite_with_http_info(tenant_id, id, from_name, opts) data @@ -6975,7 +6981,7 @@ def send_invite(tenant_id, id, from_name, opts = {}) # @param id [String] # @param from_name [String] # @param [Hash] opts the optional parameters - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def send_invite_with_http_info(tenant_id, id, from_name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.send_invite ...' @@ -7012,7 +7018,7 @@ def send_invite_with_http_info(tenant_id, id, from_name, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -7038,7 +7044,7 @@ def send_invite_with_http_info(tenant_id, id, from_name, opts = {}) # @param id [String] # @param [Hash] opts the optional parameters # @option opts [String] :redirect_url - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def send_login_link(tenant_id, id, opts = {}) data, _status_code, _headers = send_login_link_with_http_info(tenant_id, id, opts) data @@ -7048,7 +7054,7 @@ def send_login_link(tenant_id, id, opts = {}) # @param id [String] # @param [Hash] opts the optional parameters # @option opts [String] :redirect_url - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def send_login_link_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.send_login_link ...' @@ -7081,7 +7087,7 @@ def send_login_link_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -7109,7 +7115,7 @@ def send_login_link_with_http_info(tenant_id, id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [UnBlockCommentPublic200Response] + # @return [UnblockSuccess] def un_block_user_from_comment(tenant_id, id, un_block_from_comment_params, opts = {}) data, _status_code, _headers = un_block_user_from_comment_with_http_info(tenant_id, id, un_block_from_comment_params, opts) data @@ -7121,7 +7127,7 @@ def un_block_user_from_comment(tenant_id, id, un_block_from_comment_params, opts # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [Array<(UnBlockCommentPublic200Response, Integer, Hash)>] UnBlockCommentPublic200Response data, response status code and response headers + # @return [Array<(UnblockSuccess, Integer, Hash)>] UnblockSuccess data, response status code and response headers def un_block_user_from_comment_with_http_info(tenant_id, id, un_block_from_comment_params, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.un_block_user_from_comment ...' @@ -7164,7 +7170,7 @@ def un_block_user_from_comment_with_http_info(tenant_id, id, un_block_from_comme post_body = opts[:debug_body] || @api_client.object_to_http_body(un_block_from_comment_params) # return_type - return_type = opts[:debug_return_type] || 'UnBlockCommentPublic200Response' + return_type = opts[:debug_return_type] || 'UnblockSuccess' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -7191,7 +7197,7 @@ def un_block_user_from_comment_with_http_info(tenant_id, id, un_block_from_comme # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [FlagComment200Response] + # @return [FlagCommentResponse] def un_flag_comment(tenant_id, id, opts = {}) data, _status_code, _headers = un_flag_comment_with_http_info(tenant_id, id, opts) data @@ -7202,7 +7208,7 @@ def un_flag_comment(tenant_id, id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [Array<(FlagComment200Response, Integer, Hash)>] FlagComment200Response data, response status code and response headers + # @return [Array<(FlagCommentResponse, Integer, Hash)>] FlagCommentResponse data, response status code and response headers def un_flag_comment_with_http_info(tenant_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.un_flag_comment ...' @@ -7236,7 +7242,7 @@ def un_flag_comment_with_http_info(tenant_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FlagComment200Response' + return_type = opts[:debug_return_type] || 'FlagCommentResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -7265,7 +7271,7 @@ def un_flag_comment_with_http_info(tenant_id, id, opts = {}) # @option opts [String] :context_user_id # @option opts [Boolean] :do_spam_check # @option opts [Boolean] :is_live - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def update_comment(tenant_id, id, updatable_comment_params, opts = {}) data, _status_code, _headers = update_comment_with_http_info(tenant_id, id, updatable_comment_params, opts) data @@ -7278,7 +7284,7 @@ def update_comment(tenant_id, id, updatable_comment_params, opts = {}) # @option opts [String] :context_user_id # @option opts [Boolean] :do_spam_check # @option opts [Boolean] :is_live - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def update_comment_with_http_info(tenant_id, id, updatable_comment_params, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.update_comment ...' @@ -7322,7 +7328,7 @@ def update_comment_with_http_info(tenant_id, id, updatable_comment_params, opts post_body = opts[:debug_body] || @api_client.object_to_http_body(updatable_comment_params) # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -7348,7 +7354,7 @@ def update_comment_with_http_info(tenant_id, id, updatable_comment_params, opts # @param id [String] # @param update_email_template_body [UpdateEmailTemplateBody] # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def update_email_template(tenant_id, id, update_email_template_body, opts = {}) data, _status_code, _headers = update_email_template_with_http_info(tenant_id, id, update_email_template_body, opts) data @@ -7358,7 +7364,7 @@ def update_email_template(tenant_id, id, update_email_template_body, opts = {}) # @param id [String] # @param update_email_template_body [UpdateEmailTemplateBody] # @param [Hash] opts the optional parameters - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def update_email_template_with_http_info(tenant_id, id, update_email_template_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.update_email_template ...' @@ -7399,7 +7405,7 @@ def update_email_template_with_http_info(tenant_id, id, update_email_template_bo post_body = opts[:debug_body] || @api_client.object_to_http_body(update_email_template_body) # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -7425,7 +7431,7 @@ def update_email_template_with_http_info(tenant_id, id, update_email_template_bo # @param id [String] # @param feed_post [FeedPost] # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def update_feed_post(tenant_id, id, feed_post, opts = {}) data, _status_code, _headers = update_feed_post_with_http_info(tenant_id, id, feed_post, opts) data @@ -7435,7 +7441,7 @@ def update_feed_post(tenant_id, id, feed_post, opts = {}) # @param id [String] # @param feed_post [FeedPost] # @param [Hash] opts the optional parameters - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def update_feed_post_with_http_info(tenant_id, id, feed_post, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.update_feed_post ...' @@ -7476,7 +7482,7 @@ def update_feed_post_with_http_info(tenant_id, id, feed_post, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(feed_post) # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -7502,7 +7508,7 @@ def update_feed_post_with_http_info(tenant_id, id, feed_post, opts = {}) # @param id [String] # @param update_moderator_body [UpdateModeratorBody] # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def update_moderator(tenant_id, id, update_moderator_body, opts = {}) data, _status_code, _headers = update_moderator_with_http_info(tenant_id, id, update_moderator_body, opts) data @@ -7512,7 +7518,7 @@ def update_moderator(tenant_id, id, update_moderator_body, opts = {}) # @param id [String] # @param update_moderator_body [UpdateModeratorBody] # @param [Hash] opts the optional parameters - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def update_moderator_with_http_info(tenant_id, id, update_moderator_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.update_moderator ...' @@ -7553,7 +7559,7 @@ def update_moderator_with_http_info(tenant_id, id, update_moderator_body, opts = post_body = opts[:debug_body] || @api_client.object_to_http_body(update_moderator_body) # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -7580,7 +7586,7 @@ def update_moderator_with_http_info(tenant_id, id, update_moderator_body, opts = # @param update_notification_body [UpdateNotificationBody] # @param [Hash] opts the optional parameters # @option opts [String] :user_id - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def update_notification(tenant_id, id, update_notification_body, opts = {}) data, _status_code, _headers = update_notification_with_http_info(tenant_id, id, update_notification_body, opts) data @@ -7591,7 +7597,7 @@ def update_notification(tenant_id, id, update_notification_body, opts = {}) # @param update_notification_body [UpdateNotificationBody] # @param [Hash] opts the optional parameters # @option opts [String] :user_id - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def update_notification_with_http_info(tenant_id, id, update_notification_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.update_notification ...' @@ -7633,7 +7639,7 @@ def update_notification_with_http_info(tenant_id, id, update_notification_body, post_body = opts[:debug_body] || @api_client.object_to_http_body(update_notification_body) # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -7659,7 +7665,7 @@ def update_notification_with_http_info(tenant_id, id, update_notification_body, # @param id [String] # @param update_question_config_body [UpdateQuestionConfigBody] # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def update_question_config(tenant_id, id, update_question_config_body, opts = {}) data, _status_code, _headers = update_question_config_with_http_info(tenant_id, id, update_question_config_body, opts) data @@ -7669,7 +7675,7 @@ def update_question_config(tenant_id, id, update_question_config_body, opts = {} # @param id [String] # @param update_question_config_body [UpdateQuestionConfigBody] # @param [Hash] opts the optional parameters - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def update_question_config_with_http_info(tenant_id, id, update_question_config_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.update_question_config ...' @@ -7710,7 +7716,7 @@ def update_question_config_with_http_info(tenant_id, id, update_question_config_ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_question_config_body) # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -7736,7 +7742,7 @@ def update_question_config_with_http_info(tenant_id, id, update_question_config_ # @param id [String] # @param update_question_result_body [UpdateQuestionResultBody] # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def update_question_result(tenant_id, id, update_question_result_body, opts = {}) data, _status_code, _headers = update_question_result_with_http_info(tenant_id, id, update_question_result_body, opts) data @@ -7746,7 +7752,7 @@ def update_question_result(tenant_id, id, update_question_result_body, opts = {} # @param id [String] # @param update_question_result_body [UpdateQuestionResultBody] # @param [Hash] opts the optional parameters - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def update_question_result_with_http_info(tenant_id, id, update_question_result_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.update_question_result ...' @@ -7787,7 +7793,7 @@ def update_question_result_with_http_info(tenant_id, id, update_question_result_ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_question_result_body) # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -7893,7 +7899,7 @@ def update_subscription_with_http_info(tenant_id, id, update_api_user_subscripti # @param id [String] # @param update_tenant_body [UpdateTenantBody] # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def update_tenant(tenant_id, id, update_tenant_body, opts = {}) data, _status_code, _headers = update_tenant_with_http_info(tenant_id, id, update_tenant_body, opts) data @@ -7903,7 +7909,7 @@ def update_tenant(tenant_id, id, update_tenant_body, opts = {}) # @param id [String] # @param update_tenant_body [UpdateTenantBody] # @param [Hash] opts the optional parameters - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def update_tenant_with_http_info(tenant_id, id, update_tenant_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.update_tenant ...' @@ -7944,7 +7950,7 @@ def update_tenant_with_http_info(tenant_id, id, update_tenant_body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_tenant_body) # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -7970,7 +7976,7 @@ def update_tenant_with_http_info(tenant_id, id, update_tenant_body, opts = {}) # @param id [String] # @param update_tenant_package_body [UpdateTenantPackageBody] # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def update_tenant_package(tenant_id, id, update_tenant_package_body, opts = {}) data, _status_code, _headers = update_tenant_package_with_http_info(tenant_id, id, update_tenant_package_body, opts) data @@ -7980,7 +7986,7 @@ def update_tenant_package(tenant_id, id, update_tenant_package_body, opts = {}) # @param id [String] # @param update_tenant_package_body [UpdateTenantPackageBody] # @param [Hash] opts the optional parameters - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def update_tenant_package_with_http_info(tenant_id, id, update_tenant_package_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.update_tenant_package ...' @@ -8021,7 +8027,7 @@ def update_tenant_package_with_http_info(tenant_id, id, update_tenant_package_bo post_body = opts[:debug_body] || @api_client.object_to_http_body(update_tenant_package_body) # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -8048,7 +8054,7 @@ def update_tenant_package_with_http_info(tenant_id, id, update_tenant_package_bo # @param update_tenant_user_body [UpdateTenantUserBody] # @param [Hash] opts the optional parameters # @option opts [String] :update_comments - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def update_tenant_user(tenant_id, id, update_tenant_user_body, opts = {}) data, _status_code, _headers = update_tenant_user_with_http_info(tenant_id, id, update_tenant_user_body, opts) data @@ -8059,7 +8065,7 @@ def update_tenant_user(tenant_id, id, update_tenant_user_body, opts = {}) # @param update_tenant_user_body [UpdateTenantUserBody] # @param [Hash] opts the optional parameters # @option opts [String] :update_comments - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def update_tenant_user_with_http_info(tenant_id, id, update_tenant_user_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.update_tenant_user ...' @@ -8101,7 +8107,7 @@ def update_tenant_user_with_http_info(tenant_id, id, update_tenant_user_body, op post_body = opts[:debug_body] || @api_client.object_to_http_body(update_tenant_user_body) # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] @@ -8127,7 +8133,7 @@ def update_tenant_user_with_http_info(tenant_id, id, update_tenant_user_body, op # @param id [String] # @param update_user_badge_params [UpdateUserBadgeParams] # @param [Hash] opts the optional parameters - # @return [UpdateUserBadge200Response] + # @return [APIEmptySuccessResponse] def update_user_badge(tenant_id, id, update_user_badge_params, opts = {}) data, _status_code, _headers = update_user_badge_with_http_info(tenant_id, id, update_user_badge_params, opts) data @@ -8137,7 +8143,7 @@ def update_user_badge(tenant_id, id, update_user_badge_params, opts = {}) # @param id [String] # @param update_user_badge_params [UpdateUserBadgeParams] # @param [Hash] opts the optional parameters - # @return [Array<(UpdateUserBadge200Response, Integer, Hash)>] UpdateUserBadge200Response data, response status code and response headers + # @return [Array<(APIEmptySuccessResponse, Integer, Hash)>] APIEmptySuccessResponse data, response status code and response headers def update_user_badge_with_http_info(tenant_id, id, update_user_badge_params, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.update_user_badge ...' @@ -8178,7 +8184,7 @@ def update_user_badge_with_http_info(tenant_id, id, update_user_badge_params, op post_body = opts[:debug_body] || @api_client.object_to_http_body(update_user_badge_params) # return_type - return_type = opts[:debug_return_type] || 'UpdateUserBadge200Response' + return_type = opts[:debug_return_type] || 'APIEmptySuccessResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] diff --git a/client/lib/fastcomments-client/api/moderation_api.rb b/client/lib/fastcomments-client/api/moderation_api.rb new file mode 100644 index 0000000..0c0126d --- /dev/null +++ b/client/lib/fastcomments-client/api/moderation_api.rb @@ -0,0 +1,2828 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'cgi' + +module FastCommentsClient + class ModerationApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # @param comment_id [String] + # @param vote_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [VoteDeleteResponse] + def delete_moderation_vote(comment_id, vote_id, opts = {}) + data, _status_code, _headers = delete_moderation_vote_with_http_info(comment_id, vote_id, opts) + data + end + + # @param comment_id [String] + # @param vote_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(VoteDeleteResponse, Integer, Hash)>] VoteDeleteResponse data, response status code and response headers + def delete_moderation_vote_with_http_info(comment_id, vote_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.delete_moderation_vote ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.delete_moderation_vote" + end + # verify the required parameter 'vote_id' is set + if @api_client.config.client_side_validation && vote_id.nil? + fail ArgumentError, "Missing the required parameter 'vote_id' when calling ModerationApi.delete_moderation_vote" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/vote/{commentId}/{voteId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)).sub('{' + 'voteId' + '}', CGI.escape(vote_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'VoteDeleteResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.delete_moderation_vote", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#delete_moderation_vote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param [Hash] opts the optional parameters + # @option opts [Float] :page + # @option opts [Float] :count + # @option opts [String] :text_search + # @option opts [String] :by_ip_from_comment + # @option opts [String] :filters + # @option opts [String] :search_filters + # @option opts [String] :sorts + # @option opts [Boolean] :demo + # @option opts [String] :sso + # @return [ModerationAPIGetCommentsResponse] + def get_api_comments(opts = {}) + data, _status_code, _headers = get_api_comments_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [Float] :page + # @option opts [Float] :count + # @option opts [String] :text_search + # @option opts [String] :by_ip_from_comment + # @option opts [String] :filters + # @option opts [String] :search_filters + # @option opts [String] :sorts + # @option opts [Boolean] :demo + # @option opts [String] :sso + # @return [Array<(ModerationAPIGetCommentsResponse, Integer, Hash)>] ModerationAPIGetCommentsResponse data, response status code and response headers + def get_api_comments_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_api_comments ...' + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/api/comments' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? + query_params[:'text-search'] = opts[:'text_search'] if !opts[:'text_search'].nil? + query_params[:'byIPFromComment'] = opts[:'by_ip_from_comment'] if !opts[:'by_ip_from_comment'].nil? + query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil? + query_params[:'searchFilters'] = opts[:'search_filters'] if !opts[:'search_filters'].nil? + query_params[:'sorts'] = opts[:'sorts'] if !opts[:'sorts'].nil? + query_params[:'demo'] = opts[:'demo'] if !opts[:'demo'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModerationAPIGetCommentsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_api_comments", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_api_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :batch_job_id + # @option opts [String] :sso + # @return [ModerationExportStatusResponse] + def get_api_export_status(opts = {}) + data, _status_code, _headers = get_api_export_status_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :batch_job_id + # @option opts [String] :sso + # @return [Array<(ModerationExportStatusResponse, Integer, Hash)>] ModerationExportStatusResponse data, response status code and response headers + def get_api_export_status_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_api_export_status ...' + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/api/export/status' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'batchJobId'] = opts[:'batch_job_id'] if !opts[:'batch_job_id'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModerationExportStatusResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_api_export_status", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_api_export_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :text_search + # @option opts [String] :by_ip_from_comment + # @option opts [String] :filters + # @option opts [String] :search_filters + # @option opts [String] :after_id + # @option opts [Boolean] :demo + # @option opts [String] :sso + # @return [ModerationAPIGetCommentIdsResponse] + def get_api_ids(opts = {}) + data, _status_code, _headers = get_api_ids_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :text_search + # @option opts [String] :by_ip_from_comment + # @option opts [String] :filters + # @option opts [String] :search_filters + # @option opts [String] :after_id + # @option opts [Boolean] :demo + # @option opts [String] :sso + # @return [Array<(ModerationAPIGetCommentIdsResponse, Integer, Hash)>] ModerationAPIGetCommentIdsResponse data, response status code and response headers + def get_api_ids_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_api_ids ...' + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/api/ids' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'text-search'] = opts[:'text_search'] if !opts[:'text_search'].nil? + query_params[:'byIPFromComment'] = opts[:'by_ip_from_comment'] if !opts[:'by_ip_from_comment'].nil? + query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil? + query_params[:'searchFilters'] = opts[:'search_filters'] if !opts[:'search_filters'].nil? + query_params[:'afterId'] = opts[:'after_id'] if !opts[:'after_id'].nil? + query_params[:'demo'] = opts[:'demo'] if !opts[:'demo'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModerationAPIGetCommentIdsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_api_ids", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_api_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [GetBannedUsersFromCommentResponse] + def get_ban_users_from_comment(comment_id, opts = {}) + data, _status_code, _headers = get_ban_users_from_comment_with_http_info(comment_id, opts) + data + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(GetBannedUsersFromCommentResponse, Integer, Hash)>] GetBannedUsersFromCommentResponse data, response status code and response headers + def get_ban_users_from_comment_with_http_info(comment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_ban_users_from_comment ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.get_ban_users_from_comment" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/ban-users/from-comment/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetBannedUsersFromCommentResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_ban_users_from_comment", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_ban_users_from_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [GetCommentBanStatusResponse] + def get_comment_ban_status(comment_id, opts = {}) + data, _status_code, _headers = get_comment_ban_status_with_http_info(comment_id, opts) + data + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(GetCommentBanStatusResponse, Integer, Hash)>] GetCommentBanStatusResponse data, response status code and response headers + def get_comment_ban_status_with_http_info(comment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_comment_ban_status ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.get_comment_ban_status" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/get-comment-ban-status/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetCommentBanStatusResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_comment_ban_status", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_comment_ban_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [ModerationAPIChildCommentsResponse] + def get_comment_children(comment_id, opts = {}) + data, _status_code, _headers = get_comment_children_with_http_info(comment_id, opts) + data + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(ModerationAPIChildCommentsResponse, Integer, Hash)>] ModerationAPIChildCommentsResponse data, response status code and response headers + def get_comment_children_with_http_info(comment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_comment_children ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.get_comment_children" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/comment-children/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModerationAPIChildCommentsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_comment_children", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_comment_children\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :text_search + # @option opts [String] :by_ip_from_comment + # @option opts [String] :filter + # @option opts [String] :search_filters + # @option opts [Boolean] :demo + # @option opts [String] :sso + # @return [ModerationAPICountCommentsResponse] + def get_count(opts = {}) + data, _status_code, _headers = get_count_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :text_search + # @option opts [String] :by_ip_from_comment + # @option opts [String] :filter + # @option opts [String] :search_filters + # @option opts [Boolean] :demo + # @option opts [String] :sso + # @return [Array<(ModerationAPICountCommentsResponse, Integer, Hash)>] ModerationAPICountCommentsResponse data, response status code and response headers + def get_count_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_count ...' + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/count' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'text-search'] = opts[:'text_search'] if !opts[:'text_search'].nil? + query_params[:'byIPFromComment'] = opts[:'by_ip_from_comment'] if !opts[:'by_ip_from_comment'].nil? + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'searchFilters'] = opts[:'search_filters'] if !opts[:'search_filters'].nil? + query_params[:'demo'] = opts[:'demo'] if !opts[:'demo'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModerationAPICountCommentsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_count", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [GetBannedUsersCountResponse] + def get_counts(opts = {}) + data, _status_code, _headers = get_counts_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(GetBannedUsersCountResponse, Integer, Hash)>] GetBannedUsersCountResponse data, response status code and response headers + def get_counts_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_counts ...' + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/banned-users/counts' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetBannedUsersCountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_counts", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_counts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [ModerationAPIGetLogsResponse] + def get_logs(comment_id, opts = {}) + data, _status_code, _headers = get_logs_with_http_info(comment_id, opts) + data + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(ModerationAPIGetLogsResponse, Integer, Hash)>] ModerationAPIGetLogsResponse data, response status code and response headers + def get_logs_with_http_info(comment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_logs ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.get_logs" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/logs/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModerationAPIGetLogsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_logs", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [GetTenantManualBadgesResponse] + def get_manual_badges(opts = {}) + data, _status_code, _headers = get_manual_badges_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(GetTenantManualBadgesResponse, Integer, Hash)>] GetTenantManualBadgesResponse data, response status code and response headers + def get_manual_badges_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_manual_badges ...' + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/get-manual-badges' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetTenantManualBadgesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_manual_badges", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_manual_badges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :badges_user_id + # @option opts [String] :comment_id + # @option opts [String] :sso + # @return [GetUserManualBadgesResponse] + def get_manual_badges_for_user(opts = {}) + data, _status_code, _headers = get_manual_badges_for_user_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :badges_user_id + # @option opts [String] :comment_id + # @option opts [String] :sso + # @return [Array<(GetUserManualBadgesResponse, Integer, Hash)>] GetUserManualBadgesResponse data, response status code and response headers + def get_manual_badges_for_user_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_manual_badges_for_user ...' + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/get-manual-badges-for-user' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'badgesUserId'] = opts[:'badges_user_id'] if !opts[:'badges_user_id'].nil? + query_params[:'commentId'] = opts[:'comment_id'] if !opts[:'comment_id'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetUserManualBadgesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_manual_badges_for_user", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_manual_badges_for_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_email + # @option opts [Boolean] :include_ip + # @option opts [String] :sso + # @return [ModerationAPICommentResponse] + def get_moderation_comment(comment_id, opts = {}) + data, _status_code, _headers = get_moderation_comment_with_http_info(comment_id, opts) + data + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_email + # @option opts [Boolean] :include_ip + # @option opts [String] :sso + # @return [Array<(ModerationAPICommentResponse, Integer, Hash)>] ModerationAPICommentResponse data, response status code and response headers + def get_moderation_comment_with_http_info(comment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_moderation_comment ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.get_moderation_comment" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/comment/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'includeEmail'] = opts[:'include_email'] if !opts[:'include_email'].nil? + query_params[:'includeIP'] = opts[:'include_ip'] if !opts[:'include_ip'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModerationAPICommentResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_moderation_comment", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_moderation_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [GetCommentTextResponse] + def get_moderation_comment_text(comment_id, opts = {}) + data, _status_code, _headers = get_moderation_comment_text_with_http_info(comment_id, opts) + data + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(GetCommentTextResponse, Integer, Hash)>] GetCommentTextResponse data, response status code and response headers + def get_moderation_comment_text_with_http_info(comment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_moderation_comment_text ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.get_moderation_comment_text" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/get-comment-text/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetCommentTextResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_moderation_comment_text", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_moderation_comment_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_by_user_id_and_email + # @option opts [Boolean] :include_by_ip + # @option opts [Boolean] :include_by_email_domain + # @option opts [String] :sso + # @return [PreBanSummary] + def get_pre_ban_summary(comment_id, opts = {}) + data, _status_code, _headers = get_pre_ban_summary_with_http_info(comment_id, opts) + data + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_by_user_id_and_email + # @option opts [Boolean] :include_by_ip + # @option opts [Boolean] :include_by_email_domain + # @option opts [String] :sso + # @return [Array<(PreBanSummary, Integer, Hash)>] PreBanSummary data, response status code and response headers + def get_pre_ban_summary_with_http_info(comment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_pre_ban_summary ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.get_pre_ban_summary" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/pre-ban-summary/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'includeByUserIdAndEmail'] = opts[:'include_by_user_id_and_email'] if !opts[:'include_by_user_id_and_email'].nil? + query_params[:'includeByIP'] = opts[:'include_by_ip'] if !opts[:'include_by_ip'].nil? + query_params[:'includeByEmailDomain'] = opts[:'include_by_email_domain'] if !opts[:'include_by_email_domain'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'PreBanSummary' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_pre_ban_summary", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_pre_ban_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :value + # @option opts [String] :filters + # @option opts [String] :search_filters + # @option opts [String] :sso + # @return [ModerationCommentSearchResponse] + def get_search_comments_summary(opts = {}) + data, _status_code, _headers = get_search_comments_summary_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :value + # @option opts [String] :filters + # @option opts [String] :search_filters + # @option opts [String] :sso + # @return [Array<(ModerationCommentSearchResponse, Integer, Hash)>] ModerationCommentSearchResponse data, response status code and response headers + def get_search_comments_summary_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_search_comments_summary ...' + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/search/comments/summary' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'value'] = opts[:'value'] if !opts[:'value'].nil? + query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil? + query_params[:'searchFilters'] = opts[:'search_filters'] if !opts[:'search_filters'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModerationCommentSearchResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_search_comments_summary", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_search_comments_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :value + # @option opts [String] :sso + # @return [ModerationPageSearchResponse] + def get_search_pages(opts = {}) + data, _status_code, _headers = get_search_pages_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :value + # @option opts [String] :sso + # @return [Array<(ModerationPageSearchResponse, Integer, Hash)>] ModerationPageSearchResponse data, response status code and response headers + def get_search_pages_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_search_pages ...' + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/search/pages' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'value'] = opts[:'value'] if !opts[:'value'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModerationPageSearchResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_search_pages", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_search_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :value + # @option opts [String] :sso + # @return [ModerationSiteSearchResponse] + def get_search_sites(opts = {}) + data, _status_code, _headers = get_search_sites_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :value + # @option opts [String] :sso + # @return [Array<(ModerationSiteSearchResponse, Integer, Hash)>] ModerationSiteSearchResponse data, response status code and response headers + def get_search_sites_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_search_sites ...' + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/search/sites' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'value'] = opts[:'value'] if !opts[:'value'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModerationSiteSearchResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_search_sites", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_search_sites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :text_search + # @option opts [String] :sso + # @return [ModerationSuggestResponse] + def get_search_suggest(opts = {}) + data, _status_code, _headers = get_search_suggest_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :text_search + # @option opts [String] :sso + # @return [Array<(ModerationSuggestResponse, Integer, Hash)>] ModerationSuggestResponse data, response status code and response headers + def get_search_suggest_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_search_suggest ...' + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/search/suggest' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'text-search'] = opts[:'text_search'] if !opts[:'text_search'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModerationSuggestResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_search_suggest", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_search_suggest\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :value + # @option opts [String] :sso + # @return [ModerationUserSearchResponse] + def get_search_users(opts = {}) + data, _status_code, _headers = get_search_users_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :value + # @option opts [String] :sso + # @return [Array<(ModerationUserSearchResponse, Integer, Hash)>] ModerationUserSearchResponse data, response status code and response headers + def get_search_users_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_search_users ...' + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/search/users' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'value'] = opts[:'value'] if !opts[:'value'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModerationUserSearchResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_search_users", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_search_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :user_id + # @option opts [String] :sso + # @return [GetUserTrustFactorResponse] + def get_trust_factor(opts = {}) + data, _status_code, _headers = get_trust_factor_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :user_id + # @option opts [String] :sso + # @return [Array<(GetUserTrustFactorResponse, Integer, Hash)>] GetUserTrustFactorResponse data, response status code and response headers + def get_trust_factor_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_trust_factor ...' + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/get-trust-factor' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetUserTrustFactorResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_trust_factor", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_trust_factor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [APIModerateGetUserBanPreferencesResponse] + def get_user_ban_preference(opts = {}) + data, _status_code, _headers = get_user_ban_preference_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(APIModerateGetUserBanPreferencesResponse, Integer, Hash)>] APIModerateGetUserBanPreferencesResponse data, response status code and response headers + def get_user_ban_preference_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_user_ban_preference ...' + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/user-ban-preference' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'APIModerateGetUserBanPreferencesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_user_ban_preference", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_user_ban_preference\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :comment_id + # @option opts [String] :sso + # @return [GetUserInternalProfileResponse] + def get_user_internal_profile(opts = {}) + data, _status_code, _headers = get_user_internal_profile_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :comment_id + # @option opts [String] :sso + # @return [Array<(GetUserInternalProfileResponse, Integer, Hash)>] GetUserInternalProfileResponse data, response status code and response headers + def get_user_internal_profile_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.get_user_internal_profile ...' + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/get-user-internal-profile' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'commentId'] = opts[:'comment_id'] if !opts[:'comment_id'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetUserInternalProfileResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.get_user_internal_profile", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#get_user_internal_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param adjust_comment_votes_params [AdjustCommentVotesParams] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [AdjustVotesResponse] + def post_adjust_comment_votes(comment_id, adjust_comment_votes_params, opts = {}) + data, _status_code, _headers = post_adjust_comment_votes_with_http_info(comment_id, adjust_comment_votes_params, opts) + data + end + + # @param comment_id [String] + # @param adjust_comment_votes_params [AdjustCommentVotesParams] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(AdjustVotesResponse, Integer, Hash)>] AdjustVotesResponse data, response status code and response headers + def post_adjust_comment_votes_with_http_info(comment_id, adjust_comment_votes_params, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.post_adjust_comment_votes ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.post_adjust_comment_votes" + end + # verify the required parameter 'adjust_comment_votes_params' is set + if @api_client.config.client_side_validation && adjust_comment_votes_params.nil? + fail ArgumentError, "Missing the required parameter 'adjust_comment_votes_params' when calling ModerationApi.post_adjust_comment_votes" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/adjust-comment-votes/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(adjust_comment_votes_params) + + # return_type + return_type = opts[:debug_return_type] || 'AdjustVotesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.post_adjust_comment_votes", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#post_adjust_comment_votes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :text_search + # @option opts [String] :by_ip_from_comment + # @option opts [String] :filters + # @option opts [String] :search_filters + # @option opts [String] :sorts + # @option opts [String] :sso + # @return [ModerationExportResponse] + def post_api_export(opts = {}) + data, _status_code, _headers = post_api_export_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :text_search + # @option opts [String] :by_ip_from_comment + # @option opts [String] :filters + # @option opts [String] :search_filters + # @option opts [String] :sorts + # @option opts [String] :sso + # @return [Array<(ModerationExportResponse, Integer, Hash)>] ModerationExportResponse data, response status code and response headers + def post_api_export_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.post_api_export ...' + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/api/export' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'text-search'] = opts[:'text_search'] if !opts[:'text_search'].nil? + query_params[:'byIPFromComment'] = opts[:'by_ip_from_comment'] if !opts[:'by_ip_from_comment'].nil? + query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil? + query_params[:'searchFilters'] = opts[:'search_filters'] if !opts[:'search_filters'].nil? + query_params[:'sorts'] = opts[:'sorts'] if !opts[:'sorts'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModerationExportResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.post_api_export", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#post_api_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :ban_email + # @option opts [Boolean] :ban_email_domain + # @option opts [Boolean] :ban_ip + # @option opts [Boolean] :delete_all_users_comments + # @option opts [String] :banned_until + # @option opts [Boolean] :is_shadow_ban + # @option opts [String] :update_id + # @option opts [String] :ban_reason + # @option opts [String] :sso + # @return [BanUserFromCommentResult] + def post_ban_user_from_comment(comment_id, opts = {}) + data, _status_code, _headers = post_ban_user_from_comment_with_http_info(comment_id, opts) + data + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :ban_email + # @option opts [Boolean] :ban_email_domain + # @option opts [Boolean] :ban_ip + # @option opts [Boolean] :delete_all_users_comments + # @option opts [String] :banned_until + # @option opts [Boolean] :is_shadow_ban + # @option opts [String] :update_id + # @option opts [String] :ban_reason + # @option opts [String] :sso + # @return [Array<(BanUserFromCommentResult, Integer, Hash)>] BanUserFromCommentResult data, response status code and response headers + def post_ban_user_from_comment_with_http_info(comment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.post_ban_user_from_comment ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.post_ban_user_from_comment" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/ban-user/from-comment/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'banEmail'] = opts[:'ban_email'] if !opts[:'ban_email'].nil? + query_params[:'banEmailDomain'] = opts[:'ban_email_domain'] if !opts[:'ban_email_domain'].nil? + query_params[:'banIP'] = opts[:'ban_ip'] if !opts[:'ban_ip'].nil? + query_params[:'deleteAllUsersComments'] = opts[:'delete_all_users_comments'] if !opts[:'delete_all_users_comments'].nil? + query_params[:'bannedUntil'] = opts[:'banned_until'] if !opts[:'banned_until'].nil? + query_params[:'isShadowBan'] = opts[:'is_shadow_ban'] if !opts[:'is_shadow_ban'].nil? + query_params[:'updateId'] = opts[:'update_id'] if !opts[:'update_id'].nil? + query_params[:'banReason'] = opts[:'ban_reason'] if !opts[:'ban_reason'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'BanUserFromCommentResult' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.post_ban_user_from_comment", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#post_ban_user_from_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param ban_user_undo_params [BanUserUndoParams] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [APIEmptyResponse] + def post_ban_user_undo(ban_user_undo_params, opts = {}) + data, _status_code, _headers = post_ban_user_undo_with_http_info(ban_user_undo_params, opts) + data + end + + # @param ban_user_undo_params [BanUserUndoParams] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers + def post_ban_user_undo_with_http_info(ban_user_undo_params, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.post_ban_user_undo ...' + end + # verify the required parameter 'ban_user_undo_params' is set + if @api_client.config.client_side_validation && ban_user_undo_params.nil? + fail ArgumentError, "Missing the required parameter 'ban_user_undo_params' when calling ModerationApi.post_ban_user_undo" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/ban-user/undo' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(ban_user_undo_params) + + # return_type + return_type = opts[:debug_return_type] || 'APIEmptyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.post_ban_user_undo", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#post_ban_user_undo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param bulk_pre_ban_params [BulkPreBanParams] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_by_user_id_and_email + # @option opts [Boolean] :include_by_ip + # @option opts [Boolean] :include_by_email_domain + # @option opts [String] :sso + # @return [BulkPreBanSummary] + def post_bulk_pre_ban_summary(bulk_pre_ban_params, opts = {}) + data, _status_code, _headers = post_bulk_pre_ban_summary_with_http_info(bulk_pre_ban_params, opts) + data + end + + # @param bulk_pre_ban_params [BulkPreBanParams] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_by_user_id_and_email + # @option opts [Boolean] :include_by_ip + # @option opts [Boolean] :include_by_email_domain + # @option opts [String] :sso + # @return [Array<(BulkPreBanSummary, Integer, Hash)>] BulkPreBanSummary data, response status code and response headers + def post_bulk_pre_ban_summary_with_http_info(bulk_pre_ban_params, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.post_bulk_pre_ban_summary ...' + end + # verify the required parameter 'bulk_pre_ban_params' is set + if @api_client.config.client_side_validation && bulk_pre_ban_params.nil? + fail ArgumentError, "Missing the required parameter 'bulk_pre_ban_params' when calling ModerationApi.post_bulk_pre_ban_summary" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/bulk-pre-ban-summary' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'includeByUserIdAndEmail'] = opts[:'include_by_user_id_and_email'] if !opts[:'include_by_user_id_and_email'].nil? + query_params[:'includeByIP'] = opts[:'include_by_ip'] if !opts[:'include_by_ip'].nil? + query_params[:'includeByEmailDomain'] = opts[:'include_by_email_domain'] if !opts[:'include_by_email_domain'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(bulk_pre_ban_params) + + # return_type + return_type = opts[:debug_return_type] || 'BulkPreBanSummary' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.post_bulk_pre_ban_summary", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#post_bulk_pre_ban_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comments_by_ids_params [CommentsByIdsParams] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [ModerationAPIChildCommentsResponse] + def post_comments_by_ids(comments_by_ids_params, opts = {}) + data, _status_code, _headers = post_comments_by_ids_with_http_info(comments_by_ids_params, opts) + data + end + + # @param comments_by_ids_params [CommentsByIdsParams] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(ModerationAPIChildCommentsResponse, Integer, Hash)>] ModerationAPIChildCommentsResponse data, response status code and response headers + def post_comments_by_ids_with_http_info(comments_by_ids_params, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.post_comments_by_ids ...' + end + # verify the required parameter 'comments_by_ids_params' is set + if @api_client.config.client_side_validation && comments_by_ids_params.nil? + fail ArgumentError, "Missing the required parameter 'comments_by_ids_params' when calling ModerationApi.post_comments_by_ids" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/comments-by-ids' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(comments_by_ids_params) + + # return_type + return_type = opts[:debug_return_type] || 'ModerationAPIChildCommentsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.post_comments_by_ids", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#post_comments_by_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [APIEmptyResponse] + def post_flag_comment(comment_id, opts = {}) + data, _status_code, _headers = post_flag_comment_with_http_info(comment_id, opts) + data + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers + def post_flag_comment_with_http_info(comment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.post_flag_comment ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.post_flag_comment" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/flag-comment/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'APIEmptyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.post_flag_comment", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#post_flag_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [PostRemoveCommentResponse] + def post_remove_comment(comment_id, opts = {}) + data, _status_code, _headers = post_remove_comment_with_http_info(comment_id, opts) + data + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(PostRemoveCommentResponse, Integer, Hash)>] PostRemoveCommentResponse data, response status code and response headers + def post_remove_comment_with_http_info(comment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.post_remove_comment ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.post_remove_comment" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/remove-comment/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'PostRemoveCommentResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.post_remove_comment", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#post_remove_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [APIEmptyResponse] + def post_restore_deleted_comment(comment_id, opts = {}) + data, _status_code, _headers = post_restore_deleted_comment_with_http_info(comment_id, opts) + data + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers + def post_restore_deleted_comment_with_http_info(comment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.post_restore_deleted_comment ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.post_restore_deleted_comment" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/restore-deleted-comment/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'APIEmptyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.post_restore_deleted_comment", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#post_restore_deleted_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :approved + # @option opts [String] :sso + # @return [SetCommentApprovedResponse] + def post_set_comment_approval_status(comment_id, opts = {}) + data, _status_code, _headers = post_set_comment_approval_status_with_http_info(comment_id, opts) + data + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :approved + # @option opts [String] :sso + # @return [Array<(SetCommentApprovedResponse, Integer, Hash)>] SetCommentApprovedResponse data, response status code and response headers + def post_set_comment_approval_status_with_http_info(comment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.post_set_comment_approval_status ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.post_set_comment_approval_status" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/set-comment-approval-status/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'approved'] = opts[:'approved'] if !opts[:'approved'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SetCommentApprovedResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.post_set_comment_approval_status", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#post_set_comment_approval_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :reviewed + # @option opts [String] :sso + # @return [APIEmptyResponse] + def post_set_comment_review_status(comment_id, opts = {}) + data, _status_code, _headers = post_set_comment_review_status_with_http_info(comment_id, opts) + data + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :reviewed + # @option opts [String] :sso + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers + def post_set_comment_review_status_with_http_info(comment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.post_set_comment_review_status ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.post_set_comment_review_status" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/set-comment-review-status/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'reviewed'] = opts[:'reviewed'] if !opts[:'reviewed'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'APIEmptyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.post_set_comment_review_status", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#post_set_comment_review_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :spam + # @option opts [Boolean] :perm_not_spam + # @option opts [String] :sso + # @return [APIEmptyResponse] + def post_set_comment_spam_status(comment_id, opts = {}) + data, _status_code, _headers = post_set_comment_spam_status_with_http_info(comment_id, opts) + data + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :spam + # @option opts [Boolean] :perm_not_spam + # @option opts [String] :sso + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers + def post_set_comment_spam_status_with_http_info(comment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.post_set_comment_spam_status ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.post_set_comment_spam_status" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/set-comment-spam-status/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'spam'] = opts[:'spam'] if !opts[:'spam'].nil? + query_params[:'permNotSpam'] = opts[:'perm_not_spam'] if !opts[:'perm_not_spam'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'APIEmptyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.post_set_comment_spam_status", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#post_set_comment_spam_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param set_comment_text_params [SetCommentTextParams] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [SetCommentTextResponse] + def post_set_comment_text(comment_id, set_comment_text_params, opts = {}) + data, _status_code, _headers = post_set_comment_text_with_http_info(comment_id, set_comment_text_params, opts) + data + end + + # @param comment_id [String] + # @param set_comment_text_params [SetCommentTextParams] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(SetCommentTextResponse, Integer, Hash)>] SetCommentTextResponse data, response status code and response headers + def post_set_comment_text_with_http_info(comment_id, set_comment_text_params, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.post_set_comment_text ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.post_set_comment_text" + end + # verify the required parameter 'set_comment_text_params' is set + if @api_client.config.client_side_validation && set_comment_text_params.nil? + fail ArgumentError, "Missing the required parameter 'set_comment_text_params' when calling ModerationApi.post_set_comment_text" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/set-comment-text/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(set_comment_text_params) + + # return_type + return_type = opts[:debug_return_type] || 'SetCommentTextResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.post_set_comment_text", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#post_set_comment_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [APIEmptyResponse] + def post_un_flag_comment(comment_id, opts = {}) + data, _status_code, _headers = post_un_flag_comment_with_http_info(comment_id, opts) + data + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers + def post_un_flag_comment_with_http_info(comment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.post_un_flag_comment ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.post_un_flag_comment" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/un-flag-comment/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'APIEmptyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.post_un_flag_comment", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#post_un_flag_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :direction + # @option opts [String] :sso + # @return [VoteResponse] + def post_vote(comment_id, opts = {}) + data, _status_code, _headers = post_vote_with_http_info(comment_id, opts) + data + end + + # @param comment_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :direction + # @option opts [String] :sso + # @return [Array<(VoteResponse, Integer, Hash)>] VoteResponse data, response status code and response headers + def post_vote_with_http_info(comment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.post_vote ...' + end + # verify the required parameter 'comment_id' is set + if @api_client.config.client_side_validation && comment_id.nil? + fail ArgumentError, "Missing the required parameter 'comment_id' when calling ModerationApi.post_vote" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/vote/{commentId}'.sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'VoteResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.post_vote", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#post_vote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param badge_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :user_id + # @option opts [String] :comment_id + # @option opts [String] :broadcast_id + # @option opts [String] :sso + # @return [AwardUserBadgeResponse] + def put_award_badge(badge_id, opts = {}) + data, _status_code, _headers = put_award_badge_with_http_info(badge_id, opts) + data + end + + # @param badge_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :user_id + # @option opts [String] :comment_id + # @option opts [String] :broadcast_id + # @option opts [String] :sso + # @return [Array<(AwardUserBadgeResponse, Integer, Hash)>] AwardUserBadgeResponse data, response status code and response headers + def put_award_badge_with_http_info(badge_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.put_award_badge ...' + end + # verify the required parameter 'badge_id' is set + if @api_client.config.client_side_validation && badge_id.nil? + fail ArgumentError, "Missing the required parameter 'badge_id' when calling ModerationApi.put_award_badge" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/award-badge' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'badgeId'] = badge_id + query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil? + query_params[:'commentId'] = opts[:'comment_id'] if !opts[:'comment_id'].nil? + query_params[:'broadcastId'] = opts[:'broadcast_id'] if !opts[:'broadcast_id'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'AwardUserBadgeResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.put_award_badge", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#put_award_badge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param url_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [APIEmptyResponse] + def put_close_thread(url_id, opts = {}) + data, _status_code, _headers = put_close_thread_with_http_info(url_id, opts) + data + end + + # @param url_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers + def put_close_thread_with_http_info(url_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.put_close_thread ...' + end + # verify the required parameter 'url_id' is set + if @api_client.config.client_side_validation && url_id.nil? + fail ArgumentError, "Missing the required parameter 'url_id' when calling ModerationApi.put_close_thread" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/close-thread' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'urlId'] = url_id + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'APIEmptyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.put_close_thread", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#put_close_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param badge_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :user_id + # @option opts [String] :comment_id + # @option opts [String] :broadcast_id + # @option opts [String] :sso + # @return [RemoveUserBadgeResponse] + def put_remove_badge(badge_id, opts = {}) + data, _status_code, _headers = put_remove_badge_with_http_info(badge_id, opts) + data + end + + # @param badge_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :user_id + # @option opts [String] :comment_id + # @option opts [String] :broadcast_id + # @option opts [String] :sso + # @return [Array<(RemoveUserBadgeResponse, Integer, Hash)>] RemoveUserBadgeResponse data, response status code and response headers + def put_remove_badge_with_http_info(badge_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.put_remove_badge ...' + end + # verify the required parameter 'badge_id' is set + if @api_client.config.client_side_validation && badge_id.nil? + fail ArgumentError, "Missing the required parameter 'badge_id' when calling ModerationApi.put_remove_badge" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/remove-badge' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'badgeId'] = badge_id + query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil? + query_params[:'commentId'] = opts[:'comment_id'] if !opts[:'comment_id'].nil? + query_params[:'broadcastId'] = opts[:'broadcast_id'] if !opts[:'broadcast_id'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'RemoveUserBadgeResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.put_remove_badge", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#put_remove_badge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param url_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [APIEmptyResponse] + def put_reopen_thread(url_id, opts = {}) + data, _status_code, _headers = put_reopen_thread_with_http_info(url_id, opts) + data + end + + # @param url_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers + def put_reopen_thread_with_http_info(url_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.put_reopen_thread ...' + end + # verify the required parameter 'url_id' is set + if @api_client.config.client_side_validation && url_id.nil? + fail ArgumentError, "Missing the required parameter 'url_id' when calling ModerationApi.put_reopen_thread" + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/reopen-thread' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'urlId'] = url_id + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'APIEmptyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.put_reopen_thread", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#put_reopen_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :user_id + # @option opts [String] :trust_factor + # @option opts [String] :sso + # @return [SetUserTrustFactorResponse] + def set_trust_factor(opts = {}) + data, _status_code, _headers = set_trust_factor_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [String] :user_id + # @option opts [String] :trust_factor + # @option opts [String] :sso + # @return [Array<(SetUserTrustFactorResponse, Integer, Hash)>] SetUserTrustFactorResponse data, response status code and response headers + def set_trust_factor_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModerationApi.set_trust_factor ...' + end + # resource path + local_var_path = '/auth/my-account/moderate-comments/set-trust-factor' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil? + query_params[:'trustFactor'] = opts[:'trust_factor'] if !opts[:'trust_factor'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SetUserTrustFactorResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"ModerationApi.set_trust_factor", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModerationApi#set_trust_factor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/client/lib/fastcomments-client/api/public_api.rb b/client/lib/fastcomments-client/api/public_api.rb index 1af18d7..0a863cb 100644 --- a/client/lib/fastcomments-client/api/public_api.rb +++ b/client/lib/fastcomments-client/api/public_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -24,7 +24,7 @@ def initialize(api_client = ApiClient.default) # @param public_block_from_comment_params [PublicBlockFromCommentParams] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [BlockFromCommentPublic200Response] + # @return [BlockSuccess] def block_from_comment_public(tenant_id, comment_id, public_block_from_comment_params, opts = {}) data, _status_code, _headers = block_from_comment_public_with_http_info(tenant_id, comment_id, public_block_from_comment_params, opts) data @@ -35,7 +35,7 @@ def block_from_comment_public(tenant_id, comment_id, public_block_from_comment_p # @param public_block_from_comment_params [PublicBlockFromCommentParams] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [Array<(BlockFromCommentPublic200Response, Integer, Hash)>] BlockFromCommentPublic200Response data, response status code and response headers + # @return [Array<(BlockSuccess, Integer, Hash)>] BlockSuccess data, response status code and response headers def block_from_comment_public_with_http_info(tenant_id, comment_id, public_block_from_comment_params, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.block_from_comment_public ...' @@ -77,7 +77,7 @@ def block_from_comment_public_with_http_info(tenant_id, comment_id, public_block post_body = opts[:debug_body] || @api_client.object_to_http_body(public_block_from_comment_params) # return_type - return_type = opts[:debug_return_type] || 'BlockFromCommentPublic200Response' + return_type = opts[:debug_return_type] || 'BlockSuccess' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -103,7 +103,7 @@ def block_from_comment_public_with_http_info(tenant_id, comment_id, public_block # @param comment_ids [String] A comma separated list of comment ids. # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [CheckedCommentsForBlocked200Response] + # @return [CheckBlockedCommentsResponse] def checked_comments_for_blocked(tenant_id, comment_ids, opts = {}) data, _status_code, _headers = checked_comments_for_blocked_with_http_info(tenant_id, comment_ids, opts) data @@ -113,7 +113,7 @@ def checked_comments_for_blocked(tenant_id, comment_ids, opts = {}) # @param comment_ids [String] A comma separated list of comment ids. # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [Array<(CheckedCommentsForBlocked200Response, Integer, Hash)>] CheckedCommentsForBlocked200Response data, response status code and response headers + # @return [Array<(CheckBlockedCommentsResponse, Integer, Hash)>] CheckBlockedCommentsResponse data, response status code and response headers def checked_comments_for_blocked_with_http_info(tenant_id, comment_ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.checked_comments_for_blocked ...' @@ -147,7 +147,7 @@ def checked_comments_for_blocked_with_http_info(tenant_id, comment_ids, opts = { post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'CheckedCommentsForBlocked200Response' + return_type = opts[:debug_return_type] || 'CheckBlockedCommentsResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -176,7 +176,7 @@ def checked_comments_for_blocked_with_http_info(tenant_id, comment_ids, opts = { # @param [Hash] opts the optional parameters # @option opts [String] :session_id # @option opts [String] :sso - # @return [CreateCommentPublic200Response] + # @return [SaveCommentsResponseWithPresence] def create_comment_public(tenant_id, url_id, broadcast_id, comment_data, opts = {}) data, _status_code, _headers = create_comment_public_with_http_info(tenant_id, url_id, broadcast_id, comment_data, opts) data @@ -189,7 +189,7 @@ def create_comment_public(tenant_id, url_id, broadcast_id, comment_data, opts = # @param [Hash] opts the optional parameters # @option opts [String] :session_id # @option opts [String] :sso - # @return [Array<(CreateCommentPublic200Response, Integer, Hash)>] CreateCommentPublic200Response data, response status code and response headers + # @return [Array<(SaveCommentsResponseWithPresence, Integer, Hash)>] SaveCommentsResponseWithPresence data, response status code and response headers def create_comment_public_with_http_info(tenant_id, url_id, broadcast_id, comment_data, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.create_comment_public ...' @@ -237,7 +237,7 @@ def create_comment_public_with_http_info(tenant_id, url_id, broadcast_id, commen post_body = opts[:debug_body] || @api_client.object_to_http_body(comment_data) # return_type - return_type = opts[:debug_return_type] || 'CreateCommentPublic200Response' + return_type = opts[:debug_return_type] || 'SaveCommentsResponseWithPresence' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -264,7 +264,7 @@ def create_comment_public_with_http_info(tenant_id, url_id, broadcast_id, commen # @param [Hash] opts the optional parameters # @option opts [String] :broadcast_id # @option opts [String] :sso - # @return [CreateFeedPostPublic200Response] + # @return [CreateFeedPostResponse] def create_feed_post_public(tenant_id, create_feed_post_params, opts = {}) data, _status_code, _headers = create_feed_post_public_with_http_info(tenant_id, create_feed_post_params, opts) data @@ -275,7 +275,7 @@ def create_feed_post_public(tenant_id, create_feed_post_params, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :broadcast_id # @option opts [String] :sso - # @return [Array<(CreateFeedPostPublic200Response, Integer, Hash)>] CreateFeedPostPublic200Response data, response status code and response headers + # @return [Array<(CreateFeedPostResponse, Integer, Hash)>] CreateFeedPostResponse data, response status code and response headers def create_feed_post_public_with_http_info(tenant_id, create_feed_post_params, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.create_feed_post_public ...' @@ -313,7 +313,7 @@ def create_feed_post_public_with_http_info(tenant_id, create_feed_post_params, o post_body = opts[:debug_body] || @api_client.object_to_http_body(create_feed_post_params) # return_type - return_type = opts[:debug_return_type] || 'CreateFeedPostPublic200Response' + return_type = opts[:debug_return_type] || 'CreateFeedPostResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -335,13 +335,158 @@ def create_feed_post_public_with_http_info(tenant_id, create_feed_post_params, o return data, status_code, headers end + # @param tenant_id [String] + # @param url_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :title + # @return [CreateV1PageReact] + def create_v1_page_react(tenant_id, url_id, opts = {}) + data, _status_code, _headers = create_v1_page_react_with_http_info(tenant_id, url_id, opts) + data + end + + # @param tenant_id [String] + # @param url_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :title + # @return [Array<(CreateV1PageReact, Integer, Hash)>] CreateV1PageReact data, response status code and response headers + def create_v1_page_react_with_http_info(tenant_id, url_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PublicApi.create_v1_page_react ...' + end + # verify the required parameter 'tenant_id' is set + if @api_client.config.client_side_validation && tenant_id.nil? + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.create_v1_page_react" + end + # verify the required parameter 'url_id' is set + if @api_client.config.client_side_validation && url_id.nil? + fail ArgumentError, "Missing the required parameter 'url_id' when calling PublicApi.create_v1_page_react" + end + # resource path + local_var_path = '/page-reacts/v1/likes/{tenantId}'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'urlId'] = url_id + query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'CreateV1PageReact' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"PublicApi.create_v1_page_react", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PublicApi#create_v1_page_react\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param tenant_id [String] + # @param url_id [String] + # @param id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :title + # @return [CreateV1PageReact] + def create_v2_page_react(tenant_id, url_id, id, opts = {}) + data, _status_code, _headers = create_v2_page_react_with_http_info(tenant_id, url_id, id, opts) + data + end + + # @param tenant_id [String] + # @param url_id [String] + # @param id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :title + # @return [Array<(CreateV1PageReact, Integer, Hash)>] CreateV1PageReact data, response status code and response headers + def create_v2_page_react_with_http_info(tenant_id, url_id, id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PublicApi.create_v2_page_react ...' + end + # verify the required parameter 'tenant_id' is set + if @api_client.config.client_side_validation && tenant_id.nil? + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.create_v2_page_react" + end + # verify the required parameter 'url_id' is set + if @api_client.config.client_side_validation && url_id.nil? + fail ArgumentError, "Missing the required parameter 'url_id' when calling PublicApi.create_v2_page_react" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling PublicApi.create_v2_page_react" + end + # resource path + local_var_path = '/page-reacts/v2/{tenantId}'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'urlId'] = url_id + query_params[:'id'] = id + query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'CreateV1PageReact' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"PublicApi.create_v2_page_react", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PublicApi#create_v2_page_react\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # @param tenant_id [String] # @param comment_id [String] # @param broadcast_id [String] # @param [Hash] opts the optional parameters # @option opts [String] :edit_key # @option opts [String] :sso - # @return [DeleteCommentPublic200Response] + # @return [PublicAPIDeleteCommentResponse] def delete_comment_public(tenant_id, comment_id, broadcast_id, opts = {}) data, _status_code, _headers = delete_comment_public_with_http_info(tenant_id, comment_id, broadcast_id, opts) data @@ -353,7 +498,7 @@ def delete_comment_public(tenant_id, comment_id, broadcast_id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :edit_key # @option opts [String] :sso - # @return [Array<(DeleteCommentPublic200Response, Integer, Hash)>] DeleteCommentPublic200Response data, response status code and response headers + # @return [Array<(PublicAPIDeleteCommentResponse, Integer, Hash)>] PublicAPIDeleteCommentResponse data, response status code and response headers def delete_comment_public_with_http_info(tenant_id, comment_id, broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.delete_comment_public ...' @@ -391,7 +536,7 @@ def delete_comment_public_with_http_info(tenant_id, comment_id, broadcast_id, op post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'DeleteCommentPublic200Response' + return_type = opts[:debug_return_type] || 'PublicAPIDeleteCommentResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -421,7 +566,7 @@ def delete_comment_public_with_http_info(tenant_id, comment_id, broadcast_id, op # @param [Hash] opts the optional parameters # @option opts [String] :edit_key # @option opts [String] :sso - # @return [DeleteCommentVote200Response] + # @return [VoteDeleteResponse] def delete_comment_vote(tenant_id, comment_id, vote_id, url_id, broadcast_id, opts = {}) data, _status_code, _headers = delete_comment_vote_with_http_info(tenant_id, comment_id, vote_id, url_id, broadcast_id, opts) data @@ -435,7 +580,7 @@ def delete_comment_vote(tenant_id, comment_id, vote_id, url_id, broadcast_id, op # @param [Hash] opts the optional parameters # @option opts [String] :edit_key # @option opts [String] :sso - # @return [Array<(DeleteCommentVote200Response, Integer, Hash)>] DeleteCommentVote200Response data, response status code and response headers + # @return [Array<(VoteDeleteResponse, Integer, Hash)>] VoteDeleteResponse data, response status code and response headers def delete_comment_vote_with_http_info(tenant_id, comment_id, vote_id, url_id, broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.delete_comment_vote ...' @@ -482,7 +627,7 @@ def delete_comment_vote_with_http_info(tenant_id, comment_id, vote_id, url_id, b post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'DeleteCommentVote200Response' + return_type = opts[:debug_return_type] || 'VoteDeleteResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -509,7 +654,7 @@ def delete_comment_vote_with_http_info(tenant_id, comment_id, vote_id, url_id, b # @param [Hash] opts the optional parameters # @option opts [String] :broadcast_id # @option opts [String] :sso - # @return [DeleteFeedPostPublic200Response] + # @return [DeleteFeedPostPublicResponse] def delete_feed_post_public(tenant_id, post_id, opts = {}) data, _status_code, _headers = delete_feed_post_public_with_http_info(tenant_id, post_id, opts) data @@ -520,7 +665,7 @@ def delete_feed_post_public(tenant_id, post_id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :broadcast_id # @option opts [String] :sso - # @return [Array<(DeleteFeedPostPublic200Response, Integer, Hash)>] DeleteFeedPostPublic200Response data, response status code and response headers + # @return [Array<(DeleteFeedPostPublicResponse, Integer, Hash)>] DeleteFeedPostPublicResponse data, response status code and response headers def delete_feed_post_public_with_http_info(tenant_id, post_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.delete_feed_post_public ...' @@ -553,7 +698,7 @@ def delete_feed_post_public_with_http_info(tenant_id, post_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'DeleteFeedPostPublic200Response' + return_type = opts[:debug_return_type] || 'DeleteFeedPostPublicResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -575,12 +720,151 @@ def delete_feed_post_public_with_http_info(tenant_id, post_id, opts = {}) return data, status_code, headers end + # @param tenant_id [String] + # @param url_id [String] + # @param [Hash] opts the optional parameters + # @return [CreateV1PageReact] + def delete_v1_page_react(tenant_id, url_id, opts = {}) + data, _status_code, _headers = delete_v1_page_react_with_http_info(tenant_id, url_id, opts) + data + end + + # @param tenant_id [String] + # @param url_id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(CreateV1PageReact, Integer, Hash)>] CreateV1PageReact data, response status code and response headers + def delete_v1_page_react_with_http_info(tenant_id, url_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PublicApi.delete_v1_page_react ...' + end + # verify the required parameter 'tenant_id' is set + if @api_client.config.client_side_validation && tenant_id.nil? + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.delete_v1_page_react" + end + # verify the required parameter 'url_id' is set + if @api_client.config.client_side_validation && url_id.nil? + fail ArgumentError, "Missing the required parameter 'url_id' when calling PublicApi.delete_v1_page_react" + end + # resource path + local_var_path = '/page-reacts/v1/likes/{tenantId}'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'urlId'] = url_id + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'CreateV1PageReact' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"PublicApi.delete_v1_page_react", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PublicApi#delete_v1_page_react\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param tenant_id [String] + # @param url_id [String] + # @param id [String] + # @param [Hash] opts the optional parameters + # @return [CreateV1PageReact] + def delete_v2_page_react(tenant_id, url_id, id, opts = {}) + data, _status_code, _headers = delete_v2_page_react_with_http_info(tenant_id, url_id, id, opts) + data + end + + # @param tenant_id [String] + # @param url_id [String] + # @param id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(CreateV1PageReact, Integer, Hash)>] CreateV1PageReact data, response status code and response headers + def delete_v2_page_react_with_http_info(tenant_id, url_id, id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PublicApi.delete_v2_page_react ...' + end + # verify the required parameter 'tenant_id' is set + if @api_client.config.client_side_validation && tenant_id.nil? + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.delete_v2_page_react" + end + # verify the required parameter 'url_id' is set + if @api_client.config.client_side_validation && url_id.nil? + fail ArgumentError, "Missing the required parameter 'url_id' when calling PublicApi.delete_v2_page_react" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling PublicApi.delete_v2_page_react" + end + # resource path + local_var_path = '/page-reacts/v2/{tenantId}'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'urlId'] = url_id + query_params[:'id'] = id + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'CreateV1PageReact' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"PublicApi.delete_v2_page_react", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PublicApi#delete_v2_page_react\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # @param tenant_id [String] # @param comment_id [String] # @param is_flagged [Boolean] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] def flag_comment_public(tenant_id, comment_id, is_flagged, opts = {}) data, _status_code, _headers = flag_comment_public_with_http_info(tenant_id, comment_id, is_flagged, opts) data @@ -591,7 +875,7 @@ def flag_comment_public(tenant_id, comment_id, is_flagged, opts = {}) # @param is_flagged [Boolean] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [Array<(FlagCommentPublic200Response, Integer, Hash)>] FlagCommentPublic200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def flag_comment_public_with_http_info(tenant_id, comment_id, is_flagged, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.flag_comment_public ...' @@ -629,7 +913,7 @@ def flag_comment_public_with_http_info(tenant_id, comment_id, is_flagged, opts = post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FlagCommentPublic200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -656,7 +940,7 @@ def flag_comment_public_with_http_info(tenant_id, comment_id, is_flagged, opts = # @param [Hash] opts the optional parameters # @option opts [String] :edit_key # @option opts [String] :sso - # @return [GetCommentText200Response] + # @return [PublicAPIGetCommentTextResponse] def get_comment_text(tenant_id, comment_id, opts = {}) data, _status_code, _headers = get_comment_text_with_http_info(tenant_id, comment_id, opts) data @@ -667,7 +951,7 @@ def get_comment_text(tenant_id, comment_id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :edit_key # @option opts [String] :sso - # @return [Array<(GetCommentText200Response, Integer, Hash)>] GetCommentText200Response data, response status code and response headers + # @return [Array<(PublicAPIGetCommentTextResponse, Integer, Hash)>] PublicAPIGetCommentTextResponse data, response status code and response headers def get_comment_text_with_http_info(tenant_id, comment_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.get_comment_text ...' @@ -700,7 +984,7 @@ def get_comment_text_with_http_info(tenant_id, comment_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetCommentText200Response' + return_type = opts[:debug_return_type] || 'PublicAPIGetCommentTextResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -727,7 +1011,7 @@ def get_comment_text_with_http_info(tenant_id, comment_id, opts = {}) # @param dir [Integer] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [GetCommentVoteUserNames200Response] + # @return [GetCommentVoteUserNamesSuccessResponse] def get_comment_vote_user_names(tenant_id, comment_id, dir, opts = {}) data, _status_code, _headers = get_comment_vote_user_names_with_http_info(tenant_id, comment_id, dir, opts) data @@ -738,7 +1022,7 @@ def get_comment_vote_user_names(tenant_id, comment_id, dir, opts = {}) # @param dir [Integer] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [Array<(GetCommentVoteUserNames200Response, Integer, Hash)>] GetCommentVoteUserNames200Response data, response status code and response headers + # @return [Array<(GetCommentVoteUserNamesSuccessResponse, Integer, Hash)>] GetCommentVoteUserNamesSuccessResponse data, response status code and response headers def get_comment_vote_user_names_with_http_info(tenant_id, comment_id, dir, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.get_comment_vote_user_names ...' @@ -775,7 +1059,7 @@ def get_comment_vote_user_names_with_http_info(tenant_id, comment_id, dir, opts post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetCommentVoteUserNames200Response' + return_type = opts[:debug_return_type] || 'GetCommentVoteUserNamesSuccessResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -797,53 +1081,127 @@ def get_comment_vote_user_names_with_http_info(tenant_id, comment_id, dir, opts return data, status_code, headers end - # req tenantId urlId - # @param tenant_id [String] - # @param url_id [String] # @param [Hash] opts the optional parameters - # @option opts [Integer] :page + # @option opts [String] :user_id # @option opts [SortDirections] :direction - # @option opts [String] :sso - # @option opts [Integer] :skip - # @option opts [Integer] :skip_children - # @option opts [Integer] :limit - # @option opts [Integer] :limit_children - # @option opts [Boolean] :count_children - # @option opts [String] :fetch_page_for_comment_id - # @option opts [Boolean] :include_config - # @option opts [Boolean] :count_all + # @option opts [String] :replies_to_user_id + # @option opts [Float] :page # @option opts [Boolean] :includei10n # @option opts [String] :locale - # @option opts [String] :modules # @option opts [Boolean] :is_crawler - # @option opts [Boolean] :include_notification_count - # @option opts [Boolean] :as_tree - # @option opts [Integer] :max_tree_depth - # @option opts [Boolean] :use_full_translation_ids - # @option opts [String] :parent_id - # @option opts [String] :search_text - # @option opts [Array] :hash_tags - # @option opts [String] :user_id - # @option opts [String] :custom_config_str - # @option opts [String] :after_comment_id - # @option opts [String] :before_comment_id - # @return [GetCommentsPublic200Response] - def get_comments_public(tenant_id, url_id, opts = {}) - data, _status_code, _headers = get_comments_public_with_http_info(tenant_id, url_id, opts) + # @return [GetCommentsForUserResponse] + def get_comments_for_user(opts = {}) + data, _status_code, _headers = get_comments_for_user_with_http_info(opts) data end - # req tenantId urlId - # @param tenant_id [String] - # @param url_id [String] # @param [Hash] opts the optional parameters - # @option opts [Integer] :page + # @option opts [String] :user_id # @option opts [SortDirections] :direction - # @option opts [String] :sso - # @option opts [Integer] :skip - # @option opts [Integer] :skip_children - # @option opts [Integer] :limit - # @option opts [Integer] :limit_children + # @option opts [String] :replies_to_user_id + # @option opts [Float] :page + # @option opts [Boolean] :includei10n + # @option opts [String] :locale + # @option opts [Boolean] :is_crawler + # @return [Array<(GetCommentsForUserResponse, Integer, Hash)>] GetCommentsForUserResponse data, response status code and response headers + def get_comments_for_user_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PublicApi.get_comments_for_user ...' + end + # resource path + local_var_path = '/comments-for-user' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil? + query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil? + query_params[:'repliesToUserId'] = opts[:'replies_to_user_id'] if !opts[:'replies_to_user_id'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'includei10n'] = opts[:'includei10n'] if !opts[:'includei10n'].nil? + query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil? + query_params[:'isCrawler'] = opts[:'is_crawler'] if !opts[:'is_crawler'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetCommentsForUserResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"PublicApi.get_comments_for_user", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PublicApi#get_comments_for_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # req tenantId urlId + # @param tenant_id [String] + # @param url_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :page + # @option opts [SortDirections] :direction + # @option opts [String] :sso + # @option opts [Integer] :skip + # @option opts [Integer] :skip_children + # @option opts [Integer] :limit + # @option opts [Integer] :limit_children + # @option opts [Boolean] :count_children + # @option opts [String] :fetch_page_for_comment_id + # @option opts [Boolean] :include_config + # @option opts [Boolean] :count_all + # @option opts [Boolean] :includei10n + # @option opts [String] :locale + # @option opts [String] :modules + # @option opts [Boolean] :is_crawler + # @option opts [Boolean] :include_notification_count + # @option opts [Boolean] :as_tree + # @option opts [Integer] :max_tree_depth + # @option opts [Boolean] :use_full_translation_ids + # @option opts [String] :parent_id + # @option opts [String] :search_text + # @option opts [Array] :hash_tags + # @option opts [String] :user_id + # @option opts [String] :custom_config_str + # @option opts [String] :after_comment_id + # @option opts [String] :before_comment_id + # @return [GetCommentsResponseWithPresencePublicComment] + def get_comments_public(tenant_id, url_id, opts = {}) + data, _status_code, _headers = get_comments_public_with_http_info(tenant_id, url_id, opts) + data + end + + # req tenantId urlId + # @param tenant_id [String] + # @param url_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :page + # @option opts [SortDirections] :direction + # @option opts [String] :sso + # @option opts [Integer] :skip + # @option opts [Integer] :skip_children + # @option opts [Integer] :limit + # @option opts [Integer] :limit_children # @option opts [Boolean] :count_children # @option opts [String] :fetch_page_for_comment_id # @option opts [Boolean] :include_config @@ -863,7 +1221,7 @@ def get_comments_public(tenant_id, url_id, opts = {}) # @option opts [String] :custom_config_str # @option opts [String] :after_comment_id # @option opts [String] :before_comment_id - # @return [Array<(GetCommentsPublic200Response, Integer, Hash)>] GetCommentsPublic200Response data, response status code and response headers + # @return [Array<(GetCommentsResponseWithPresencePublicComment, Integer, Hash)>] GetCommentsResponseWithPresencePublicComment data, response status code and response headers def get_comments_public_with_http_info(tenant_id, url_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.get_comments_public ...' @@ -921,7 +1279,7 @@ def get_comments_public_with_http_info(tenant_id, url_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetCommentsPublic200Response' + return_type = opts[:debug_return_type] || 'GetCommentsResponseWithPresencePublicComment' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -948,11 +1306,11 @@ def get_comments_public_with_http_info(tenant_id, url_id, opts = {}) # @param url_id [String] # @param user_id_ws [String] # @param start_time [Integer] - # @param end_time [Integer] # @param [Hash] opts the optional parameters - # @return [GetEventLog200Response] - def get_event_log(tenant_id, url_id, user_id_ws, start_time, end_time, opts = {}) - data, _status_code, _headers = get_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, end_time, opts) + # @option opts [Integer] :end_time + # @return [GetEventLogResponse] + def get_event_log(tenant_id, url_id, user_id_ws, start_time, opts = {}) + data, _status_code, _headers = get_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, opts) data end @@ -961,10 +1319,10 @@ def get_event_log(tenant_id, url_id, user_id_ws, start_time, end_time, opts = {} # @param url_id [String] # @param user_id_ws [String] # @param start_time [Integer] - # @param end_time [Integer] # @param [Hash] opts the optional parameters - # @return [Array<(GetEventLog200Response, Integer, Hash)>] GetEventLog200Response data, response status code and response headers - def get_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, end_time, opts = {}) + # @option opts [Integer] :end_time + # @return [Array<(GetEventLogResponse, Integer, Hash)>] GetEventLogResponse data, response status code and response headers + def get_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.get_event_log ...' end @@ -984,10 +1342,6 @@ def get_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, end_ if @api_client.config.client_side_validation && start_time.nil? fail ArgumentError, "Missing the required parameter 'start_time' when calling PublicApi.get_event_log" end - # verify the required parameter 'end_time' is set - if @api_client.config.client_side_validation && end_time.nil? - fail ArgumentError, "Missing the required parameter 'end_time' when calling PublicApi.get_event_log" - end # resource path local_var_path = '/event-log/{tenantId}'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) @@ -996,7 +1350,7 @@ def get_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, end_ query_params[:'urlId'] = url_id query_params[:'userIdWS'] = user_id_ws query_params[:'startTime'] = start_time - query_params[:'endTime'] = end_time + query_params[:'endTime'] = opts[:'end_time'] if !opts[:'end_time'].nil? # header parameters header_params = opts[:header_params] || {} @@ -1010,7 +1364,7 @@ def get_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, end_ post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetEventLog200Response' + return_type = opts[:debug_return_type] || 'GetEventLogResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -1041,7 +1395,7 @@ def get_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, end_ # @option opts [String] :sso # @option opts [Boolean] :is_crawler # @option opts [Boolean] :include_user_info - # @return [GetFeedPostsPublic200Response] + # @return [PublicFeedPostsResponse] def get_feed_posts_public(tenant_id, opts = {}) data, _status_code, _headers = get_feed_posts_public_with_http_info(tenant_id, opts) data @@ -1056,7 +1410,7 @@ def get_feed_posts_public(tenant_id, opts = {}) # @option opts [String] :sso # @option opts [Boolean] :is_crawler # @option opts [Boolean] :include_user_info - # @return [Array<(GetFeedPostsPublic200Response, Integer, Hash)>] GetFeedPostsPublic200Response data, response status code and response headers + # @return [Array<(PublicFeedPostsResponse, Integer, Hash)>] PublicFeedPostsResponse data, response status code and response headers def get_feed_posts_public_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.get_feed_posts_public ...' @@ -1089,7 +1443,7 @@ def get_feed_posts_public_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetFeedPostsPublic200Response' + return_type = opts[:debug_return_type] || 'PublicFeedPostsResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -1115,7 +1469,7 @@ def get_feed_posts_public_with_http_info(tenant_id, opts = {}) # @param post_ids [Array] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [GetFeedPostsStats200Response] + # @return [FeedPostsStatsResponse] def get_feed_posts_stats(tenant_id, post_ids, opts = {}) data, _status_code, _headers = get_feed_posts_stats_with_http_info(tenant_id, post_ids, opts) data @@ -1125,7 +1479,7 @@ def get_feed_posts_stats(tenant_id, post_ids, opts = {}) # @param post_ids [Array] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [Array<(GetFeedPostsStats200Response, Integer, Hash)>] GetFeedPostsStats200Response data, response status code and response headers + # @return [Array<(FeedPostsStatsResponse, Integer, Hash)>] FeedPostsStatsResponse data, response status code and response headers def get_feed_posts_stats_with_http_info(tenant_id, post_ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.get_feed_posts_stats ...' @@ -1158,7 +1512,7 @@ def get_feed_posts_stats_with_http_info(tenant_id, post_ids, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetFeedPostsStats200Response' + return_type = opts[:debug_return_type] || 'FeedPostsStatsResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -1180,60 +1534,37 @@ def get_feed_posts_stats_with_http_info(tenant_id, post_ids, opts = {}) return data, status_code, headers end - # req tenantId urlId userIdWS # @param tenant_id [String] - # @param url_id [String] - # @param user_id_ws [String] - # @param start_time [Integer] - # @param end_time [Integer] + # @param large_internal_url_sanitized [String] # @param [Hash] opts the optional parameters - # @return [GetEventLog200Response] - def get_global_event_log(tenant_id, url_id, user_id_ws, start_time, end_time, opts = {}) - data, _status_code, _headers = get_global_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, end_time, opts) + # @return [GifGetLargeResponse] + def get_gif_large(tenant_id, large_internal_url_sanitized, opts = {}) + data, _status_code, _headers = get_gif_large_with_http_info(tenant_id, large_internal_url_sanitized, opts) data end - # req tenantId urlId userIdWS # @param tenant_id [String] - # @param url_id [String] - # @param user_id_ws [String] - # @param start_time [Integer] - # @param end_time [Integer] + # @param large_internal_url_sanitized [String] # @param [Hash] opts the optional parameters - # @return [Array<(GetEventLog200Response, Integer, Hash)>] GetEventLog200Response data, response status code and response headers - def get_global_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, end_time, opts = {}) + # @return [Array<(GifGetLargeResponse, Integer, Hash)>] GifGetLargeResponse data, response status code and response headers + def get_gif_large_with_http_info(tenant_id, large_internal_url_sanitized, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.get_global_event_log ...' + @api_client.config.logger.debug 'Calling API: PublicApi.get_gif_large ...' end # verify the required parameter 'tenant_id' is set if @api_client.config.client_side_validation && tenant_id.nil? - fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_global_event_log" - end - # verify the required parameter 'url_id' is set - if @api_client.config.client_side_validation && url_id.nil? - fail ArgumentError, "Missing the required parameter 'url_id' when calling PublicApi.get_global_event_log" - end - # verify the required parameter 'user_id_ws' is set - if @api_client.config.client_side_validation && user_id_ws.nil? - fail ArgumentError, "Missing the required parameter 'user_id_ws' when calling PublicApi.get_global_event_log" + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_gif_large" end - # verify the required parameter 'start_time' is set - if @api_client.config.client_side_validation && start_time.nil? - fail ArgumentError, "Missing the required parameter 'start_time' when calling PublicApi.get_global_event_log" - end - # verify the required parameter 'end_time' is set - if @api_client.config.client_side_validation && end_time.nil? - fail ArgumentError, "Missing the required parameter 'end_time' when calling PublicApi.get_global_event_log" + # verify the required parameter 'large_internal_url_sanitized' is set + if @api_client.config.client_side_validation && large_internal_url_sanitized.nil? + fail ArgumentError, "Missing the required parameter 'large_internal_url_sanitized' when calling PublicApi.get_gif_large" end # resource path - local_var_path = '/event-log/global/{tenantId}'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) + local_var_path = '/gifs/get-large/{tenantId}'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'urlId'] = url_id - query_params[:'userIdWS'] = user_id_ws - query_params[:'startTime'] = start_time - query_params[:'endTime'] = end_time + query_params[:'largeInternalURLSanitized'] = large_internal_url_sanitized # header parameters header_params = opts[:header_params] || {} @@ -1247,13 +1578,13 @@ def get_global_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_tim post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetEventLog200Response' + return_type = opts[:debug_return_type] || 'GifGetLargeResponse' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( - :operation => :"PublicApi.get_global_event_log", + :operation => :"PublicApi.get_gif_large", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1264,39 +1595,51 @@ def get_global_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_tim data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: PublicApi#get_global_event_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PublicApi#get_gif_large\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # @param tenant_id [String] + # @param search [String] # @param [Hash] opts the optional parameters - # @option opts [String] :sso - # @return [GetUserNotificationCount200Response] - def get_user_notification_count(tenant_id, opts = {}) - data, _status_code, _headers = get_user_notification_count_with_http_info(tenant_id, opts) + # @option opts [String] :locale + # @option opts [String] :rating + # @option opts [Float] :page + # @return [GetGifsSearchResponse] + def get_gifs_search(tenant_id, search, opts = {}) + data, _status_code, _headers = get_gifs_search_with_http_info(tenant_id, search, opts) data end # @param tenant_id [String] + # @param search [String] # @param [Hash] opts the optional parameters - # @option opts [String] :sso - # @return [Array<(GetUserNotificationCount200Response, Integer, Hash)>] GetUserNotificationCount200Response data, response status code and response headers - def get_user_notification_count_with_http_info(tenant_id, opts = {}) + # @option opts [String] :locale + # @option opts [String] :rating + # @option opts [Float] :page + # @return [Array<(GetGifsSearchResponse, Integer, Hash)>] GetGifsSearchResponse data, response status code and response headers + def get_gifs_search_with_http_info(tenant_id, search, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.get_user_notification_count ...' + @api_client.config.logger.debug 'Calling API: PublicApi.get_gifs_search ...' end # verify the required parameter 'tenant_id' is set if @api_client.config.client_side_validation && tenant_id.nil? - fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_user_notification_count" + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_gifs_search" + end + # verify the required parameter 'search' is set + if @api_client.config.client_side_validation && search.nil? + fail ArgumentError, "Missing the required parameter 'search' when calling PublicApi.get_gifs_search" end # resource path - local_var_path = '/user-notifications/get-count' + local_var_path = '/gifs/search/{tenantId}'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'tenantId'] = tenant_id - query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + query_params[:'search'] = search + query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil? + query_params[:'rating'] = opts[:'rating'] if !opts[:'rating'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? # header parameters header_params = opts[:header_params] || {} @@ -1310,13 +1653,13 @@ def get_user_notification_count_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetUserNotificationCount200Response' + return_type = opts[:debug_return_type] || 'GetGifsSearchResponse' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( - :operation => :"PublicApi.get_user_notification_count", + :operation => :"PublicApi.get_gifs_search", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1327,63 +1670,44 @@ def get_user_notification_count_with_http_info(tenant_id, opts = {}) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: PublicApi#get_user_notification_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PublicApi#get_gifs_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # @param tenant_id [String] # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size - # @option opts [String] :after_id - # @option opts [Boolean] :include_context - # @option opts [Integer] :after_created_at - # @option opts [Boolean] :unread_only - # @option opts [Boolean] :dm_only - # @option opts [Boolean] :no_dm - # @option opts [Boolean] :include_translations - # @option opts [String] :sso - # @return [GetUserNotifications200Response] - def get_user_notifications(tenant_id, opts = {}) - data, _status_code, _headers = get_user_notifications_with_http_info(tenant_id, opts) + # @option opts [String] :locale + # @option opts [String] :rating + # @option opts [Float] :page + # @return [GetGifsTrendingResponse] + def get_gifs_trending(tenant_id, opts = {}) + data, _status_code, _headers = get_gifs_trending_with_http_info(tenant_id, opts) data end # @param tenant_id [String] # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size - # @option opts [String] :after_id - # @option opts [Boolean] :include_context - # @option opts [Integer] :after_created_at - # @option opts [Boolean] :unread_only - # @option opts [Boolean] :dm_only - # @option opts [Boolean] :no_dm - # @option opts [Boolean] :include_translations - # @option opts [String] :sso - # @return [Array<(GetUserNotifications200Response, Integer, Hash)>] GetUserNotifications200Response data, response status code and response headers - def get_user_notifications_with_http_info(tenant_id, opts = {}) + # @option opts [String] :locale + # @option opts [String] :rating + # @option opts [Float] :page + # @return [Array<(GetGifsTrendingResponse, Integer, Hash)>] GetGifsTrendingResponse data, response status code and response headers + def get_gifs_trending_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.get_user_notifications ...' + @api_client.config.logger.debug 'Calling API: PublicApi.get_gifs_trending ...' end # verify the required parameter 'tenant_id' is set if @api_client.config.client_side_validation && tenant_id.nil? - fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_user_notifications" + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_gifs_trending" end # resource path - local_var_path = '/user-notifications' + local_var_path = '/gifs/trending/{tenantId}'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'tenantId'] = tenant_id - query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil? - query_params[:'afterId'] = opts[:'after_id'] if !opts[:'after_id'].nil? - query_params[:'includeContext'] = opts[:'include_context'] if !opts[:'include_context'].nil? - query_params[:'afterCreatedAt'] = opts[:'after_created_at'] if !opts[:'after_created_at'].nil? - query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil? - query_params[:'dmOnly'] = opts[:'dm_only'] if !opts[:'dm_only'].nil? - query_params[:'noDm'] = opts[:'no_dm'] if !opts[:'no_dm'].nil? - query_params[:'includeTranslations'] = opts[:'include_translations'] if !opts[:'include_translations'].nil? - query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil? + query_params[:'rating'] = opts[:'rating'] if !opts[:'rating'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? # header parameters header_params = opts[:header_params] || {} @@ -1397,13 +1721,13 @@ def get_user_notifications_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetUserNotifications200Response' + return_type = opts[:debug_return_type] || 'GetGifsTrendingResponse' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( - :operation => :"PublicApi.get_user_notifications", + :operation => :"PublicApi.get_gifs_trending", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1414,50 +1738,61 @@ def get_user_notifications_with_http_info(tenant_id, opts = {}) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: PublicApi#get_user_notifications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PublicApi#get_gifs_trending\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end + # req tenantId urlId userIdWS # @param tenant_id [String] - # @param url_id_ws [String] - # @param user_ids [String] + # @param url_id [String] + # @param user_id_ws [String] + # @param start_time [Integer] # @param [Hash] opts the optional parameters - # @return [GetUserPresenceStatuses200Response] - def get_user_presence_statuses(tenant_id, url_id_ws, user_ids, opts = {}) - data, _status_code, _headers = get_user_presence_statuses_with_http_info(tenant_id, url_id_ws, user_ids, opts) + # @option opts [Integer] :end_time + # @return [GetEventLogResponse] + def get_global_event_log(tenant_id, url_id, user_id_ws, start_time, opts = {}) + data, _status_code, _headers = get_global_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, opts) data end + # req tenantId urlId userIdWS # @param tenant_id [String] - # @param url_id_ws [String] - # @param user_ids [String] + # @param url_id [String] + # @param user_id_ws [String] + # @param start_time [Integer] # @param [Hash] opts the optional parameters - # @return [Array<(GetUserPresenceStatuses200Response, Integer, Hash)>] GetUserPresenceStatuses200Response data, response status code and response headers - def get_user_presence_statuses_with_http_info(tenant_id, url_id_ws, user_ids, opts = {}) + # @option opts [Integer] :end_time + # @return [Array<(GetEventLogResponse, Integer, Hash)>] GetEventLogResponse data, response status code and response headers + def get_global_event_log_with_http_info(tenant_id, url_id, user_id_ws, start_time, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.get_user_presence_statuses ...' + @api_client.config.logger.debug 'Calling API: PublicApi.get_global_event_log ...' end # verify the required parameter 'tenant_id' is set if @api_client.config.client_side_validation && tenant_id.nil? - fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_user_presence_statuses" + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_global_event_log" end - # verify the required parameter 'url_id_ws' is set - if @api_client.config.client_side_validation && url_id_ws.nil? - fail ArgumentError, "Missing the required parameter 'url_id_ws' when calling PublicApi.get_user_presence_statuses" + # verify the required parameter 'url_id' is set + if @api_client.config.client_side_validation && url_id.nil? + fail ArgumentError, "Missing the required parameter 'url_id' when calling PublicApi.get_global_event_log" end - # verify the required parameter 'user_ids' is set - if @api_client.config.client_side_validation && user_ids.nil? - fail ArgumentError, "Missing the required parameter 'user_ids' when calling PublicApi.get_user_presence_statuses" + # verify the required parameter 'user_id_ws' is set + if @api_client.config.client_side_validation && user_id_ws.nil? + fail ArgumentError, "Missing the required parameter 'user_id_ws' when calling PublicApi.get_global_event_log" + end + # verify the required parameter 'start_time' is set + if @api_client.config.client_side_validation && start_time.nil? + fail ArgumentError, "Missing the required parameter 'start_time' when calling PublicApi.get_global_event_log" end # resource path - local_var_path = '/user-presence-status' + local_var_path = '/event-log/global/{tenantId}'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'tenantId'] = tenant_id - query_params[:'urlIdWS'] = url_id_ws - query_params[:'userIds'] = user_ids + query_params[:'urlId'] = url_id + query_params[:'userIdWS'] = user_id_ws + query_params[:'startTime'] = start_time + query_params[:'endTime'] = opts[:'end_time'] if !opts[:'end_time'].nil? # header parameters header_params = opts[:header_params] || {} @@ -1471,13 +1806,13 @@ def get_user_presence_statuses_with_http_info(tenant_id, url_id_ws, user_ids, op post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetUserPresenceStatuses200Response' + return_type = opts[:debug_return_type] || 'GetEventLogResponse' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( - :operation => :"PublicApi.get_user_presence_statuses", + :operation => :"PublicApi.get_global_event_log", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1488,41 +1823,50 @@ def get_user_presence_statuses_with_http_info(tenant_id, url_id_ws, user_ids, op data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: PublicApi#get_user_presence_statuses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PublicApi#get_global_event_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end + # Past commenters on the page who are NOT currently online. Sorted by displayName. Use this after exhausting /users/online to render a \"Members\" section. Cursor pagination on commenterName: server walks the partial {tenantId, urlId, commenterName} index from afterName forward via $gt, no $skip cost. # @param tenant_id [String] + # @param url_id [String] Page URL identifier (cleaned server-side). # @param [Hash] opts the optional parameters - # @option opts [Array] :post_ids - # @option opts [String] :sso - # @return [GetUserReactsPublic200Response] - def get_user_reacts_public(tenant_id, opts = {}) - data, _status_code, _headers = get_user_reacts_public_with_http_info(tenant_id, opts) + # @option opts [String] :after_name Cursor: pass nextAfterName from the previous response. + # @option opts [String] :after_user_id Cursor tiebreaker: pass nextAfterUserId from the previous response. Required when afterName is set so name-ties don't drop entries. + # @return [PageUsersOfflineResponse] + def get_offline_users(tenant_id, url_id, opts = {}) + data, _status_code, _headers = get_offline_users_with_http_info(tenant_id, url_id, opts) data end + # Past commenters on the page who are NOT currently online. Sorted by displayName. Use this after exhausting /users/online to render a \"Members\" section. Cursor pagination on commenterName: server walks the partial {tenantId, urlId, commenterName} index from afterName forward via $gt, no $skip cost. # @param tenant_id [String] + # @param url_id [String] Page URL identifier (cleaned server-side). # @param [Hash] opts the optional parameters - # @option opts [Array] :post_ids - # @option opts [String] :sso - # @return [Array<(GetUserReactsPublic200Response, Integer, Hash)>] GetUserReactsPublic200Response data, response status code and response headers - def get_user_reacts_public_with_http_info(tenant_id, opts = {}) + # @option opts [String] :after_name Cursor: pass nextAfterName from the previous response. + # @option opts [String] :after_user_id Cursor tiebreaker: pass nextAfterUserId from the previous response. Required when afterName is set so name-ties don't drop entries. + # @return [Array<(PageUsersOfflineResponse, Integer, Hash)>] PageUsersOfflineResponse data, response status code and response headers + def get_offline_users_with_http_info(tenant_id, url_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.get_user_reacts_public ...' + @api_client.config.logger.debug 'Calling API: PublicApi.get_offline_users ...' end # verify the required parameter 'tenant_id' is set if @api_client.config.client_side_validation && tenant_id.nil? - fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_user_reacts_public" + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_offline_users" + end + # verify the required parameter 'url_id' is set + if @api_client.config.client_side_validation && url_id.nil? + fail ArgumentError, "Missing the required parameter 'url_id' when calling PublicApi.get_offline_users" end # resource path - local_var_path = '/feed-posts/{tenantId}/user-reacts'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) + local_var_path = '/pages/{tenantId}/users/offline'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'postIds'] = @api_client.build_collection_param(opts[:'post_ids'], :multi) if !opts[:'post_ids'].nil? - query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + query_params[:'urlId'] = url_id + query_params[:'afterName'] = opts[:'after_name'] if !opts[:'after_name'].nil? + query_params[:'afterUserId'] = opts[:'after_user_id'] if !opts[:'after_user_id'].nil? # header parameters header_params = opts[:header_params] || {} @@ -1536,13 +1880,13 @@ def get_user_reacts_public_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'GetUserReactsPublic200Response' + return_type = opts[:debug_return_type] || 'PageUsersOfflineResponse' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( - :operation => :"PublicApi.get_user_reacts_public", + :operation => :"PublicApi.get_offline_users", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1553,37 +1897,826 @@ def get_user_reacts_public_with_http_info(tenant_id, opts = {}) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: PublicApi#get_user_reacts_public\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PublicApi#get_offline_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end + # Currently-online viewers of a page: people whose websocket session is subscribed to the page right now. Returns anonCount + totalCount (room-wide subscribers, including anon viewers we don't enumerate). # @param tenant_id [String] - # @param comment_id [String] - # @param broadcast_id [String] + # @param url_id [String] Page URL identifier (cleaned server-side). # @param [Hash] opts the optional parameters - # @option opts [String] :sso - # @return [LockComment200Response] - def lock_comment(tenant_id, comment_id, broadcast_id, opts = {}) - data, _status_code, _headers = lock_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts) + # @option opts [String] :after_name Cursor: pass nextAfterName from the previous response. + # @option opts [String] :after_user_id Cursor tiebreaker: pass nextAfterUserId from the previous response. Required when afterName is set so name-ties don't drop entries. + # @return [PageUsersOnlineResponse] + def get_online_users(tenant_id, url_id, opts = {}) + data, _status_code, _headers = get_online_users_with_http_info(tenant_id, url_id, opts) data end + # Currently-online viewers of a page: people whose websocket session is subscribed to the page right now. Returns anonCount + totalCount (room-wide subscribers, including anon viewers we don't enumerate). # @param tenant_id [String] - # @param comment_id [String] - # @param broadcast_id [String] + # @param url_id [String] Page URL identifier (cleaned server-side). # @param [Hash] opts the optional parameters - # @option opts [String] :sso - # @return [Array<(LockComment200Response, Integer, Hash)>] LockComment200Response data, response status code and response headers - def lock_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts = {}) + # @option opts [String] :after_name Cursor: pass nextAfterName from the previous response. + # @option opts [String] :after_user_id Cursor tiebreaker: pass nextAfterUserId from the previous response. Required when afterName is set so name-ties don't drop entries. + # @return [Array<(PageUsersOnlineResponse, Integer, Hash)>] PageUsersOnlineResponse data, response status code and response headers + def get_online_users_with_http_info(tenant_id, url_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.lock_comment ...' + @api_client.config.logger.debug 'Calling API: PublicApi.get_online_users ...' end # verify the required parameter 'tenant_id' is set if @api_client.config.client_side_validation && tenant_id.nil? - fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.lock_comment" + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_online_users" end - # verify the required parameter 'comment_id' is set + # verify the required parameter 'url_id' is set + if @api_client.config.client_side_validation && url_id.nil? + fail ArgumentError, "Missing the required parameter 'url_id' when calling PublicApi.get_online_users" + end + # resource path + local_var_path = '/pages/{tenantId}/users/online'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'urlId'] = url_id + query_params[:'afterName'] = opts[:'after_name'] if !opts[:'after_name'].nil? + query_params[:'afterUserId'] = opts[:'after_user_id'] if !opts[:'after_user_id'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'PageUsersOnlineResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"PublicApi.get_online_users", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PublicApi#get_online_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List pages for a tenant. Used by the FChat desktop client to populate its room list. Requires `enableFChat` to be true on the resolved custom config for each page. Pages that require SSO are filtered against the requesting user's group access. + # @param tenant_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :cursor Opaque pagination cursor returned as `nextCursor` from a prior request. Tied to the same `sortBy`. + # @option opts [Integer] :limit 1..200, default 50 + # @option opts [String] :q Optional case-insensitive title prefix filter. + # @option opts [PagesSortBy] :sort_by Sort order. `updatedAt` (default, newest first), `commentCount` (most comments first), or `title` (alphabetical). + # @option opts [Boolean] :has_comments If true, only return pages with at least one comment. + # @return [GetPublicPagesResponse] + def get_pages_public(tenant_id, opts = {}) + data, _status_code, _headers = get_pages_public_with_http_info(tenant_id, opts) + data + end + + # List pages for a tenant. Used by the FChat desktop client to populate its room list. Requires `enableFChat` to be true on the resolved custom config for each page. Pages that require SSO are filtered against the requesting user's group access. + # @param tenant_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :cursor Opaque pagination cursor returned as `nextCursor` from a prior request. Tied to the same `sortBy`. + # @option opts [Integer] :limit 1..200, default 50 + # @option opts [String] :q Optional case-insensitive title prefix filter. + # @option opts [PagesSortBy] :sort_by Sort order. `updatedAt` (default, newest first), `commentCount` (most comments first), or `title` (alphabetical). + # @option opts [Boolean] :has_comments If true, only return pages with at least one comment. + # @return [Array<(GetPublicPagesResponse, Integer, Hash)>] GetPublicPagesResponse data, response status code and response headers + def get_pages_public_with_http_info(tenant_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PublicApi.get_pages_public ...' + end + # verify the required parameter 'tenant_id' is set + if @api_client.config.client_side_validation && tenant_id.nil? + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_pages_public" + end + # resource path + local_var_path = '/pages/{tenantId}'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? + query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? + query_params[:'hasComments'] = opts[:'has_comments'] if !opts[:'has_comments'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetPublicPagesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"PublicApi.get_pages_public", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PublicApi#get_pages_public\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param namespace [String] + # @param component [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :locale + # @option opts [Boolean] :use_full_translation_ids + # @return [GetTranslationsResponse] + def get_translations(namespace, component, opts = {}) + data, _status_code, _headers = get_translations_with_http_info(namespace, component, opts) + data + end + + # @param namespace [String] + # @param component [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :locale + # @option opts [Boolean] :use_full_translation_ids + # @return [Array<(GetTranslationsResponse, Integer, Hash)>] GetTranslationsResponse data, response status code and response headers + def get_translations_with_http_info(namespace, component, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PublicApi.get_translations ...' + end + # verify the required parameter 'namespace' is set + if @api_client.config.client_side_validation && namespace.nil? + fail ArgumentError, "Missing the required parameter 'namespace' when calling PublicApi.get_translations" + end + # verify the required parameter 'component' is set + if @api_client.config.client_side_validation && component.nil? + fail ArgumentError, "Missing the required parameter 'component' when calling PublicApi.get_translations" + end + # resource path + local_var_path = '/translations/{namespace}/{component}'.sub('{' + 'namespace' + '}', CGI.escape(namespace.to_s)).sub('{' + 'component' + '}', CGI.escape(component.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil? + query_params[:'useFullTranslationIds'] = opts[:'use_full_translation_ids'] if !opts[:'use_full_translation_ids'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetTranslationsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"PublicApi.get_translations", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PublicApi#get_translations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param tenant_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [GetUserNotificationCountResponse] + def get_user_notification_count(tenant_id, opts = {}) + data, _status_code, _headers = get_user_notification_count_with_http_info(tenant_id, opts) + data + end + + # @param tenant_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(GetUserNotificationCountResponse, Integer, Hash)>] GetUserNotificationCountResponse data, response status code and response headers + def get_user_notification_count_with_http_info(tenant_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PublicApi.get_user_notification_count ...' + end + # verify the required parameter 'tenant_id' is set + if @api_client.config.client_side_validation && tenant_id.nil? + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_user_notification_count" + end + # resource path + local_var_path = '/user-notifications/get-count' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'tenantId'] = tenant_id + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetUserNotificationCountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"PublicApi.get_user_notification_count", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PublicApi#get_user_notification_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param tenant_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :url_id Used to determine whether the current page is subscribed. + # @option opts [Integer] :page_size + # @option opts [String] :after_id + # @option opts [Boolean] :include_context + # @option opts [Integer] :after_created_at + # @option opts [Boolean] :unread_only + # @option opts [Boolean] :dm_only + # @option opts [Boolean] :no_dm + # @option opts [Boolean] :include_translations + # @option opts [Boolean] :include_tenant_notifications + # @option opts [String] :sso + # @return [GetMyNotificationsResponse] + def get_user_notifications(tenant_id, opts = {}) + data, _status_code, _headers = get_user_notifications_with_http_info(tenant_id, opts) + data + end + + # @param tenant_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :url_id Used to determine whether the current page is subscribed. + # @option opts [Integer] :page_size + # @option opts [String] :after_id + # @option opts [Boolean] :include_context + # @option opts [Integer] :after_created_at + # @option opts [Boolean] :unread_only + # @option opts [Boolean] :dm_only + # @option opts [Boolean] :no_dm + # @option opts [Boolean] :include_translations + # @option opts [Boolean] :include_tenant_notifications + # @option opts [String] :sso + # @return [Array<(GetMyNotificationsResponse, Integer, Hash)>] GetMyNotificationsResponse data, response status code and response headers + def get_user_notifications_with_http_info(tenant_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PublicApi.get_user_notifications ...' + end + # verify the required parameter 'tenant_id' is set + if @api_client.config.client_side_validation && tenant_id.nil? + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_user_notifications" + end + # resource path + local_var_path = '/user-notifications' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'tenantId'] = tenant_id + query_params[:'urlId'] = opts[:'url_id'] if !opts[:'url_id'].nil? + query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'afterId'] = opts[:'after_id'] if !opts[:'after_id'].nil? + query_params[:'includeContext'] = opts[:'include_context'] if !opts[:'include_context'].nil? + query_params[:'afterCreatedAt'] = opts[:'after_created_at'] if !opts[:'after_created_at'].nil? + query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil? + query_params[:'dmOnly'] = opts[:'dm_only'] if !opts[:'dm_only'].nil? + query_params[:'noDm'] = opts[:'no_dm'] if !opts[:'no_dm'].nil? + query_params[:'includeTranslations'] = opts[:'include_translations'] if !opts[:'include_translations'].nil? + query_params[:'includeTenantNotifications'] = opts[:'include_tenant_notifications'] if !opts[:'include_tenant_notifications'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetMyNotificationsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"PublicApi.get_user_notifications", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PublicApi#get_user_notifications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param tenant_id [String] + # @param url_id_ws [String] + # @param user_ids [String] + # @param [Hash] opts the optional parameters + # @return [GetUserPresenceStatusesResponse] + def get_user_presence_statuses(tenant_id, url_id_ws, user_ids, opts = {}) + data, _status_code, _headers = get_user_presence_statuses_with_http_info(tenant_id, url_id_ws, user_ids, opts) + data + end + + # @param tenant_id [String] + # @param url_id_ws [String] + # @param user_ids [String] + # @param [Hash] opts the optional parameters + # @return [Array<(GetUserPresenceStatusesResponse, Integer, Hash)>] GetUserPresenceStatusesResponse data, response status code and response headers + def get_user_presence_statuses_with_http_info(tenant_id, url_id_ws, user_ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PublicApi.get_user_presence_statuses ...' + end + # verify the required parameter 'tenant_id' is set + if @api_client.config.client_side_validation && tenant_id.nil? + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_user_presence_statuses" + end + # verify the required parameter 'url_id_ws' is set + if @api_client.config.client_side_validation && url_id_ws.nil? + fail ArgumentError, "Missing the required parameter 'url_id_ws' when calling PublicApi.get_user_presence_statuses" + end + # verify the required parameter 'user_ids' is set + if @api_client.config.client_side_validation && user_ids.nil? + fail ArgumentError, "Missing the required parameter 'user_ids' when calling PublicApi.get_user_presence_statuses" + end + # resource path + local_var_path = '/user-presence-status' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'tenantId'] = tenant_id + query_params[:'urlIdWS'] = url_id_ws + query_params[:'userIds'] = user_ids + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetUserPresenceStatusesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"PublicApi.get_user_presence_statuses", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PublicApi#get_user_presence_statuses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param tenant_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Array] :post_ids + # @option opts [String] :sso + # @return [UserReactsResponse] + def get_user_reacts_public(tenant_id, opts = {}) + data, _status_code, _headers = get_user_reacts_public_with_http_info(tenant_id, opts) + data + end + + # @param tenant_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Array] :post_ids + # @option opts [String] :sso + # @return [Array<(UserReactsResponse, Integer, Hash)>] UserReactsResponse data, response status code and response headers + def get_user_reacts_public_with_http_info(tenant_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PublicApi.get_user_reacts_public ...' + end + # verify the required parameter 'tenant_id' is set + if @api_client.config.client_side_validation && tenant_id.nil? + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_user_reacts_public" + end + # resource path + local_var_path = '/feed-posts/{tenantId}/user-reacts'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'postIds'] = @api_client.build_collection_param(opts[:'post_ids'], :multi) if !opts[:'post_ids'].nil? + query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserReactsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"PublicApi.get_user_reacts_public", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PublicApi#get_user_reacts_public\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Bulk user info for a tenant. Given userIds, return display info from User / SSOUser. Used by the comment widget to enrich users that just appeared via a presence event. No page context: privacy is enforced uniformly (private profiles are masked). + # @param tenant_id [String] + # @param ids [String] Comma-delimited userIds. + # @param [Hash] opts the optional parameters + # @return [PageUsersInfoResponse] + def get_users_info(tenant_id, ids, opts = {}) + data, _status_code, _headers = get_users_info_with_http_info(tenant_id, ids, opts) + data + end + + # Bulk user info for a tenant. Given userIds, return display info from User / SSOUser. Used by the comment widget to enrich users that just appeared via a presence event. No page context: privacy is enforced uniformly (private profiles are masked). + # @param tenant_id [String] + # @param ids [String] Comma-delimited userIds. + # @param [Hash] opts the optional parameters + # @return [Array<(PageUsersInfoResponse, Integer, Hash)>] PageUsersInfoResponse data, response status code and response headers + def get_users_info_with_http_info(tenant_id, ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PublicApi.get_users_info ...' + end + # verify the required parameter 'tenant_id' is set + if @api_client.config.client_side_validation && tenant_id.nil? + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_users_info" + end + # verify the required parameter 'ids' is set + if @api_client.config.client_side_validation && ids.nil? + fail ArgumentError, "Missing the required parameter 'ids' when calling PublicApi.get_users_info" + end + # resource path + local_var_path = '/pages/{tenantId}/users/info'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'ids'] = ids + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'PageUsersInfoResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"PublicApi.get_users_info", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PublicApi#get_users_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param tenant_id [String] + # @param url_id [String] + # @param [Hash] opts the optional parameters + # @return [GetV1PageLikes] + def get_v1_page_likes(tenant_id, url_id, opts = {}) + data, _status_code, _headers = get_v1_page_likes_with_http_info(tenant_id, url_id, opts) + data + end + + # @param tenant_id [String] + # @param url_id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(GetV1PageLikes, Integer, Hash)>] GetV1PageLikes data, response status code and response headers + def get_v1_page_likes_with_http_info(tenant_id, url_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PublicApi.get_v1_page_likes ...' + end + # verify the required parameter 'tenant_id' is set + if @api_client.config.client_side_validation && tenant_id.nil? + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_v1_page_likes" + end + # verify the required parameter 'url_id' is set + if @api_client.config.client_side_validation && url_id.nil? + fail ArgumentError, "Missing the required parameter 'url_id' when calling PublicApi.get_v1_page_likes" + end + # resource path + local_var_path = '/page-reacts/v1/likes/{tenantId}'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'urlId'] = url_id + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetV1PageLikes' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"PublicApi.get_v1_page_likes", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PublicApi#get_v1_page_likes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param tenant_id [String] + # @param url_id [String] + # @param id [String] + # @param [Hash] opts the optional parameters + # @return [GetV2PageReactUsersResponse] + def get_v2_page_react_users(tenant_id, url_id, id, opts = {}) + data, _status_code, _headers = get_v2_page_react_users_with_http_info(tenant_id, url_id, id, opts) + data + end + + # @param tenant_id [String] + # @param url_id [String] + # @param id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(GetV2PageReactUsersResponse, Integer, Hash)>] GetV2PageReactUsersResponse data, response status code and response headers + def get_v2_page_react_users_with_http_info(tenant_id, url_id, id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PublicApi.get_v2_page_react_users ...' + end + # verify the required parameter 'tenant_id' is set + if @api_client.config.client_side_validation && tenant_id.nil? + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_v2_page_react_users" + end + # verify the required parameter 'url_id' is set + if @api_client.config.client_side_validation && url_id.nil? + fail ArgumentError, "Missing the required parameter 'url_id' when calling PublicApi.get_v2_page_react_users" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling PublicApi.get_v2_page_react_users" + end + # resource path + local_var_path = '/page-reacts/v2/{tenantId}/list'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'urlId'] = url_id + query_params[:'id'] = id + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetV2PageReactUsersResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"PublicApi.get_v2_page_react_users", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PublicApi#get_v2_page_react_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param tenant_id [String] + # @param url_id [String] + # @param [Hash] opts the optional parameters + # @return [GetV2PageReacts] + def get_v2_page_reacts(tenant_id, url_id, opts = {}) + data, _status_code, _headers = get_v2_page_reacts_with_http_info(tenant_id, url_id, opts) + data + end + + # @param tenant_id [String] + # @param url_id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(GetV2PageReacts, Integer, Hash)>] GetV2PageReacts data, response status code and response headers + def get_v2_page_reacts_with_http_info(tenant_id, url_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PublicApi.get_v2_page_reacts ...' + end + # verify the required parameter 'tenant_id' is set + if @api_client.config.client_side_validation && tenant_id.nil? + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.get_v2_page_reacts" + end + # verify the required parameter 'url_id' is set + if @api_client.config.client_side_validation && url_id.nil? + fail ArgumentError, "Missing the required parameter 'url_id' when calling PublicApi.get_v2_page_reacts" + end + # resource path + local_var_path = '/page-reacts/v2/{tenantId}'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'urlId'] = url_id + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetV2PageReacts' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"PublicApi.get_v2_page_reacts", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PublicApi#get_v2_page_reacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # @param tenant_id [String] + # @param comment_id [String] + # @param broadcast_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [APIEmptyResponse] + def lock_comment(tenant_id, comment_id, broadcast_id, opts = {}) + data, _status_code, _headers = lock_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts) + data + end + + # @param tenant_id [String] + # @param comment_id [String] + # @param broadcast_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers + def lock_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PublicApi.lock_comment ...' + end + # verify the required parameter 'tenant_id' is set + if @api_client.config.client_side_validation && tenant_id.nil? + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PublicApi.lock_comment" + end + # verify the required parameter 'comment_id' is set if @api_client.config.client_side_validation && comment_id.nil? fail ArgumentError, "Missing the required parameter 'comment_id' when calling PublicApi.lock_comment" end @@ -1611,7 +2744,7 @@ def lock_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'LockComment200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -1633,12 +2766,65 @@ def lock_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts = {}) return data, status_code, headers end + # @param [Hash] opts the optional parameters + # @return [APIEmptyResponse] + def logout_public(opts = {}) + data, _status_code, _headers = logout_public_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers + def logout_public_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PublicApi.logout_public ...' + end + # resource path + local_var_path = '/auth/logout' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'APIEmptyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"PublicApi.logout_public", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PublicApi#logout_public\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # @param tenant_id [String] # @param comment_id [String] # @param broadcast_id [String] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [PinComment200Response] + # @return [ChangeCommentPinStatusResponse] def pin_comment(tenant_id, comment_id, broadcast_id, opts = {}) data, _status_code, _headers = pin_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts) data @@ -1649,7 +2835,7 @@ def pin_comment(tenant_id, comment_id, broadcast_id, opts = {}) # @param broadcast_id [String] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [Array<(PinComment200Response, Integer, Hash)>] PinComment200Response data, response status code and response headers + # @return [Array<(ChangeCommentPinStatusResponse, Integer, Hash)>] ChangeCommentPinStatusResponse data, response status code and response headers def pin_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.pin_comment ...' @@ -1686,7 +2872,7 @@ def pin_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'PinComment200Response' + return_type = opts[:debug_return_type] || 'ChangeCommentPinStatusResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -1715,7 +2901,7 @@ def pin_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts = {}) # @option opts [Boolean] :is_undo # @option opts [String] :broadcast_id # @option opts [String] :sso - # @return [ReactFeedPostPublic200Response] + # @return [ReactFeedPostResponse] def react_feed_post_public(tenant_id, post_id, react_body_params, opts = {}) data, _status_code, _headers = react_feed_post_public_with_http_info(tenant_id, post_id, react_body_params, opts) data @@ -1728,7 +2914,7 @@ def react_feed_post_public(tenant_id, post_id, react_body_params, opts = {}) # @option opts [Boolean] :is_undo # @option opts [String] :broadcast_id # @option opts [String] :sso - # @return [Array<(ReactFeedPostPublic200Response, Integer, Hash)>] ReactFeedPostPublic200Response data, response status code and response headers + # @return [Array<(ReactFeedPostResponse, Integer, Hash)>] ReactFeedPostResponse data, response status code and response headers def react_feed_post_public_with_http_info(tenant_id, post_id, react_body_params, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.react_feed_post_public ...' @@ -1771,7 +2957,7 @@ def react_feed_post_public_with_http_info(tenant_id, post_id, react_body_params, post_body = opts[:debug_body] || @api_client.object_to_http_body(react_body_params) # return_type - return_type = opts[:debug_return_type] || 'ReactFeedPostPublic200Response' + return_type = opts[:debug_return_type] || 'ReactFeedPostResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -1796,7 +2982,7 @@ def react_feed_post_public_with_http_info(tenant_id, post_id, react_body_params, # @param tenant_id [String] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [ResetUserNotifications200Response] + # @return [ResetUserNotificationsResponse] def reset_user_notification_count(tenant_id, opts = {}) data, _status_code, _headers = reset_user_notification_count_with_http_info(tenant_id, opts) data @@ -1805,7 +2991,7 @@ def reset_user_notification_count(tenant_id, opts = {}) # @param tenant_id [String] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [Array<(ResetUserNotifications200Response, Integer, Hash)>] ResetUserNotifications200Response data, response status code and response headers + # @return [Array<(ResetUserNotificationsResponse, Integer, Hash)>] ResetUserNotificationsResponse data, response status code and response headers def reset_user_notification_count_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.reset_user_notification_count ...' @@ -1834,7 +3020,7 @@ def reset_user_notification_count_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'ResetUserNotifications200Response' + return_type = opts[:debug_return_type] || 'ResetUserNotificationsResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -1864,7 +3050,7 @@ def reset_user_notification_count_with_http_info(tenant_id, opts = {}) # @option opts [Boolean] :dm_only # @option opts [Boolean] :no_dm # @option opts [String] :sso - # @return [ResetUserNotifications200Response] + # @return [ResetUserNotificationsResponse] def reset_user_notifications(tenant_id, opts = {}) data, _status_code, _headers = reset_user_notifications_with_http_info(tenant_id, opts) data @@ -1878,7 +3064,7 @@ def reset_user_notifications(tenant_id, opts = {}) # @option opts [Boolean] :dm_only # @option opts [Boolean] :no_dm # @option opts [String] :sso - # @return [Array<(ResetUserNotifications200Response, Integer, Hash)>] ResetUserNotifications200Response data, response status code and response headers + # @return [Array<(ResetUserNotificationsResponse, Integer, Hash)>] ResetUserNotificationsResponse data, response status code and response headers def reset_user_notifications_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.reset_user_notifications ...' @@ -1912,7 +3098,7 @@ def reset_user_notifications_with_http_info(tenant_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'ResetUserNotifications200Response' + return_type = opts[:debug_return_type] || 'ResetUserNotificationsResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -1941,7 +3127,7 @@ def reset_user_notifications_with_http_info(tenant_id, opts = {}) # @option opts [Array] :mention_group_ids # @option opts [String] :sso # @option opts [String] :search_section - # @return [SearchUsers200Response] + # @return [SearchUsersResult] def search_users(tenant_id, url_id, opts = {}) data, _status_code, _headers = search_users_with_http_info(tenant_id, url_id, opts) data @@ -1954,7 +3140,7 @@ def search_users(tenant_id, url_id, opts = {}) # @option opts [Array] :mention_group_ids # @option opts [String] :sso # @option opts [String] :search_section - # @return [Array<(SearchUsers200Response, Integer, Hash)>] SearchUsers200Response data, response status code and response headers + # @return [Array<(SearchUsersResult, Integer, Hash)>] SearchUsersResult data, response status code and response headers def search_users_with_http_info(tenant_id, url_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.search_users ...' @@ -1994,7 +3180,7 @@ def search_users_with_http_info(tenant_id, url_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'SearchUsers200Response' + return_type = opts[:debug_return_type] || 'SearchUsersResult' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -2023,7 +3209,7 @@ def search_users_with_http_info(tenant_id, url_id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :edit_key # @option opts [String] :sso - # @return [SetCommentText200Response] + # @return [PublicAPISetCommentTextResponse] def set_comment_text(tenant_id, comment_id, broadcast_id, comment_text_update_request, opts = {}) data, _status_code, _headers = set_comment_text_with_http_info(tenant_id, comment_id, broadcast_id, comment_text_update_request, opts) data @@ -2036,7 +3222,7 @@ def set_comment_text(tenant_id, comment_id, broadcast_id, comment_text_update_re # @param [Hash] opts the optional parameters # @option opts [String] :edit_key # @option opts [String] :sso - # @return [Array<(SetCommentText200Response, Integer, Hash)>] SetCommentText200Response data, response status code and response headers + # @return [Array<(PublicAPISetCommentTextResponse, Integer, Hash)>] PublicAPISetCommentTextResponse data, response status code and response headers def set_comment_text_with_http_info(tenant_id, comment_id, broadcast_id, comment_text_update_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.set_comment_text ...' @@ -2083,7 +3269,7 @@ def set_comment_text_with_http_info(tenant_id, comment_id, broadcast_id, comment post_body = opts[:debug_body] || @api_client.object_to_http_body(comment_text_update_request) # return_type - return_type = opts[:debug_return_type] || 'SetCommentText200Response' + return_type = opts[:debug_return_type] || 'PublicAPISetCommentTextResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -2110,7 +3296,7 @@ def set_comment_text_with_http_info(tenant_id, comment_id, broadcast_id, comment # @param public_block_from_comment_params [PublicBlockFromCommentParams] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [UnBlockCommentPublic200Response] + # @return [UnblockSuccess] def un_block_comment_public(tenant_id, comment_id, public_block_from_comment_params, opts = {}) data, _status_code, _headers = un_block_comment_public_with_http_info(tenant_id, comment_id, public_block_from_comment_params, opts) data @@ -2121,7 +3307,7 @@ def un_block_comment_public(tenant_id, comment_id, public_block_from_comment_par # @param public_block_from_comment_params [PublicBlockFromCommentParams] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [Array<(UnBlockCommentPublic200Response, Integer, Hash)>] UnBlockCommentPublic200Response data, response status code and response headers + # @return [Array<(UnblockSuccess, Integer, Hash)>] UnblockSuccess data, response status code and response headers def un_block_comment_public_with_http_info(tenant_id, comment_id, public_block_from_comment_params, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.un_block_comment_public ...' @@ -2163,7 +3349,7 @@ def un_block_comment_public_with_http_info(tenant_id, comment_id, public_block_f post_body = opts[:debug_body] || @api_client.object_to_http_body(public_block_from_comment_params) # return_type - return_type = opts[:debug_return_type] || 'UnBlockCommentPublic200Response' + return_type = opts[:debug_return_type] || 'UnblockSuccess' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -2190,7 +3376,7 @@ def un_block_comment_public_with_http_info(tenant_id, comment_id, public_block_f # @param broadcast_id [String] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [LockComment200Response] + # @return [APIEmptyResponse] def un_lock_comment(tenant_id, comment_id, broadcast_id, opts = {}) data, _status_code, _headers = un_lock_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts) data @@ -2201,7 +3387,7 @@ def un_lock_comment(tenant_id, comment_id, broadcast_id, opts = {}) # @param broadcast_id [String] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [Array<(LockComment200Response, Integer, Hash)>] LockComment200Response data, response status code and response headers + # @return [Array<(APIEmptyResponse, Integer, Hash)>] APIEmptyResponse data, response status code and response headers def un_lock_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.un_lock_comment ...' @@ -2238,7 +3424,7 @@ def un_lock_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts = { post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'LockComment200Response' + return_type = opts[:debug_return_type] || 'APIEmptyResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -2265,7 +3451,7 @@ def un_lock_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts = { # @param broadcast_id [String] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [PinComment200Response] + # @return [ChangeCommentPinStatusResponse] def un_pin_comment(tenant_id, comment_id, broadcast_id, opts = {}) data, _status_code, _headers = un_pin_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts) data @@ -2276,7 +3462,7 @@ def un_pin_comment(tenant_id, comment_id, broadcast_id, opts = {}) # @param broadcast_id [String] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [Array<(PinComment200Response, Integer, Hash)>] PinComment200Response data, response status code and response headers + # @return [Array<(ChangeCommentPinStatusResponse, Integer, Hash)>] ChangeCommentPinStatusResponse data, response status code and response headers def un_pin_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.un_pin_comment ...' @@ -2313,7 +3499,7 @@ def un_pin_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts = {} post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'PinComment200Response' + return_type = opts[:debug_return_type] || 'ChangeCommentPinStatusResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -2341,7 +3527,7 @@ def un_pin_comment_with_http_info(tenant_id, comment_id, broadcast_id, opts = {} # @param [Hash] opts the optional parameters # @option opts [String] :broadcast_id # @option opts [String] :sso - # @return [CreateFeedPostPublic200Response] + # @return [CreateFeedPostResponse] def update_feed_post_public(tenant_id, post_id, update_feed_post_params, opts = {}) data, _status_code, _headers = update_feed_post_public_with_http_info(tenant_id, post_id, update_feed_post_params, opts) data @@ -2353,7 +3539,7 @@ def update_feed_post_public(tenant_id, post_id, update_feed_post_params, opts = # @param [Hash] opts the optional parameters # @option opts [String] :broadcast_id # @option opts [String] :sso - # @return [Array<(CreateFeedPostPublic200Response, Integer, Hash)>] CreateFeedPostPublic200Response data, response status code and response headers + # @return [Array<(CreateFeedPostResponse, Integer, Hash)>] CreateFeedPostResponse data, response status code and response headers def update_feed_post_public_with_http_info(tenant_id, post_id, update_feed_post_params, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.update_feed_post_public ...' @@ -2395,7 +3581,7 @@ def update_feed_post_public_with_http_info(tenant_id, post_id, update_feed_post_ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_feed_post_params) # return_type - return_type = opts[:debug_return_type] || 'CreateFeedPostPublic200Response' + return_type = opts[:debug_return_type] || 'CreateFeedPostResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -2424,7 +3610,7 @@ def update_feed_post_public_with_http_info(tenant_id, post_id, update_feed_post_ # @param comment_id [String] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [UpdateUserNotificationStatus200Response] + # @return [UpdateUserNotificationCommentSubscriptionStatusResponse] def update_user_notification_comment_subscription_status(tenant_id, notification_id, opted_in_or_out, comment_id, opts = {}) data, _status_code, _headers = update_user_notification_comment_subscription_status_with_http_info(tenant_id, notification_id, opted_in_or_out, comment_id, opts) data @@ -2437,7 +3623,7 @@ def update_user_notification_comment_subscription_status(tenant_id, notification # @param comment_id [String] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [Array<(UpdateUserNotificationStatus200Response, Integer, Hash)>] UpdateUserNotificationStatus200Response data, response status code and response headers + # @return [Array<(UpdateUserNotificationCommentSubscriptionStatusResponse, Integer, Hash)>] UpdateUserNotificationCommentSubscriptionStatusResponse data, response status code and response headers def update_user_notification_comment_subscription_status_with_http_info(tenant_id, notification_id, opted_in_or_out, comment_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.update_user_notification_comment_subscription_status ...' @@ -2484,7 +3670,7 @@ def update_user_notification_comment_subscription_status_with_http_info(tenant_i post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'UpdateUserNotificationStatus200Response' + return_type = opts[:debug_return_type] || 'UpdateUserNotificationCommentSubscriptionStatusResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -2514,7 +3700,7 @@ def update_user_notification_comment_subscription_status_with_http_info(tenant_i # @param subscribed_or_unsubscribed [String] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [UpdateUserNotificationStatus200Response] + # @return [UpdateUserNotificationPageSubscriptionStatusResponse] def update_user_notification_page_subscription_status(tenant_id, url_id, url, page_title, subscribed_or_unsubscribed, opts = {}) data, _status_code, _headers = update_user_notification_page_subscription_status_with_http_info(tenant_id, url_id, url, page_title, subscribed_or_unsubscribed, opts) data @@ -2528,7 +3714,7 @@ def update_user_notification_page_subscription_status(tenant_id, url_id, url, pa # @param subscribed_or_unsubscribed [String] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [Array<(UpdateUserNotificationStatus200Response, Integer, Hash)>] UpdateUserNotificationStatus200Response data, response status code and response headers + # @return [Array<(UpdateUserNotificationPageSubscriptionStatusResponse, Integer, Hash)>] UpdateUserNotificationPageSubscriptionStatusResponse data, response status code and response headers def update_user_notification_page_subscription_status_with_http_info(tenant_id, url_id, url, page_title, subscribed_or_unsubscribed, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.update_user_notification_page_subscription_status ...' @@ -2581,7 +3767,7 @@ def update_user_notification_page_subscription_status_with_http_info(tenant_id, post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'UpdateUserNotificationStatus200Response' + return_type = opts[:debug_return_type] || 'UpdateUserNotificationPageSubscriptionStatusResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -2608,7 +3794,7 @@ def update_user_notification_page_subscription_status_with_http_info(tenant_id, # @param new_status [String] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [UpdateUserNotificationStatus200Response] + # @return [UpdateUserNotificationStatusResponse] def update_user_notification_status(tenant_id, notification_id, new_status, opts = {}) data, _status_code, _headers = update_user_notification_status_with_http_info(tenant_id, notification_id, new_status, opts) data @@ -2619,7 +3805,7 @@ def update_user_notification_status(tenant_id, notification_id, new_status, opts # @param new_status [String] # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [Array<(UpdateUserNotificationStatus200Response, Integer, Hash)>] UpdateUserNotificationStatus200Response data, response status code and response headers + # @return [Array<(UpdateUserNotificationStatusResponse, Integer, Hash)>] UpdateUserNotificationStatusResponse data, response status code and response headers def update_user_notification_status_with_http_info(tenant_id, notification_id, new_status, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.update_user_notification_status ...' @@ -2661,7 +3847,7 @@ def update_user_notification_status_with_http_info(tenant_id, notification_id, n post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'UpdateUserNotificationStatus200Response' + return_type = opts[:debug_return_type] || 'UpdateUserNotificationStatusResponse' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -2770,7 +3956,7 @@ def upload_image_with_http_info(tenant_id, file, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :session_id # @option opts [String] :sso - # @return [VoteComment200Response] + # @return [VoteResponse] def vote_comment(tenant_id, comment_id, url_id, broadcast_id, vote_body_params, opts = {}) data, _status_code, _headers = vote_comment_with_http_info(tenant_id, comment_id, url_id, broadcast_id, vote_body_params, opts) data @@ -2784,7 +3970,7 @@ def vote_comment(tenant_id, comment_id, url_id, broadcast_id, vote_body_params, # @param [Hash] opts the optional parameters # @option opts [String] :session_id # @option opts [String] :sso - # @return [Array<(VoteComment200Response, Integer, Hash)>] VoteComment200Response data, response status code and response headers + # @return [Array<(VoteResponse, Integer, Hash)>] VoteResponse data, response status code and response headers def vote_comment_with_http_info(tenant_id, comment_id, url_id, broadcast_id, vote_body_params, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PublicApi.vote_comment ...' @@ -2836,7 +4022,7 @@ def vote_comment_with_http_info(tenant_id, comment_id, url_id, broadcast_id, vot post_body = opts[:debug_body] || @api_client.object_to_http_body(vote_body_params) # return_type - return_type = opts[:debug_return_type] || 'VoteComment200Response' + return_type = opts[:debug_return_type] || 'VoteResponse' # auth_names auth_names = opts[:debug_auth_names] || [] diff --git a/client/lib/fastcomments-client/api_client.rb b/client/lib/fastcomments-client/api_client.rb index 3633afd..6edf407 100644 --- a/client/lib/fastcomments-client/api_client.rb +++ b/client/lib/fastcomments-client/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -278,13 +278,9 @@ def convert_to_type(data, return_type) data.each { |k, v| hash[k] = convert_to_type(v, sub_type) } end else - # models (e.g. Pet) or oneOf/anyOf + # models (e.g. Pet) or oneOf klass = FastCommentsClient.const_get(return_type) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) - klass.build(data) - else - klass.build_from_hash(data) - end + klass.respond_to?(:openapi_one_of) ? klass.build(data) : klass.build_from_hash(data) end end diff --git a/client/lib/fastcomments-client/api_error.rb b/client/lib/fastcomments-client/api_error.rb index 255ccf0..fb5d552 100644 --- a/client/lib/fastcomments-client/api_error.rb +++ b/client/lib/fastcomments-client/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/api_model_base.rb b/client/lib/fastcomments-client/api_model_base.rb deleted file mode 100644 index 5e3bdb5..0000000 --- a/client/lib/fastcomments-client/api_model_base.rb +++ /dev/null @@ -1,88 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -module FastCommentsClient - class ApiModelBase - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = FastCommentsClient.const_get(type) - klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/client/lib/fastcomments-client/configuration.rb b/client/lib/fastcomments-client/configuration.rb index 245bd55..531c441 100644 --- a/client/lib/fastcomments-client/configuration.rb +++ b/client/lib/fastcomments-client/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/add_domain_config_params.rb b/client/lib/fastcomments-client/models/add_domain_config_params.rb index b909d12..5adb578 100644 --- a/client/lib/fastcomments-client/models/add_domain_config_params.rb +++ b/client/lib/fastcomments-client/models/add_domain_config_params.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class AddDomainConfigParams < ApiModelBase + class AddDomainConfigParams attr_accessor :domain attr_accessor :email_from_name @@ -200,6 +200,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -216,6 +271,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/add_domain_config_response.rb b/client/lib/fastcomments-client/models/add_domain_config_response.rb new file mode 100644 index 0000000..5673cba --- /dev/null +++ b/client/lib/fastcomments-client/models/add_domain_config_response.rb @@ -0,0 +1,104 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + module AddDomainConfigResponse + class << self + # List of class defined in anyOf (OpenAPI v3) + def openapi_any_of + [ + :'AddDomainConfigResponseAnyOf', + :'GetDomainConfigsResponseAnyOf1' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of anyOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of anyOf items and attempt to identify the appropriate one. + # Note: + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_any_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_any_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass, data) + return if data.nil? + + case klass.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.iso8601(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type, item) } + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } + end + else # model + const = FastCommentsClient.const_get(klass) + if const + if const.respond_to?(:openapi_any_of) # nested anyOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue + raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" + end + end + end + +end diff --git a/client/lib/fastcomments-client/models/add_domain_config200_response_any_of.rb b/client/lib/fastcomments-client/models/add_domain_config_response_any_of.rb similarity index 64% rename from client/lib/fastcomments-client/models/add_domain_config200_response_any_of.rb rename to client/lib/fastcomments-client/models/add_domain_config_response_any_of.rb index 96a8f44..24ef689 100644 --- a/client/lib/fastcomments-client/models/add_domain_config200_response_any_of.rb +++ b/client/lib/fastcomments-client/models/add_domain_config_response_any_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class AddDomainConfig200ResponseAnyOf < ApiModelBase + class AddDomainConfigResponseAnyOf attr_accessor :configuration attr_accessor :status @@ -57,14 +57,14 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::AddDomainConfig200ResponseAnyOf` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::AddDomainConfigResponseAnyOf` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::AddDomainConfig200ResponseAnyOf`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::AddDomainConfigResponseAnyOf`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -141,6 +141,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -157,6 +212,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/add_page_api_response.rb b/client/lib/fastcomments-client/models/add_page_api_response.rb index 1e97187..1450e37 100644 --- a/client/lib/fastcomments-client/models/add_page_api_response.rb +++ b/client/lib/fastcomments-client/models/add_page_api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class AddPageAPIResponse < ApiModelBase + class AddPageAPIResponse attr_accessor :reason attr_accessor :code @@ -170,6 +170,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -186,6 +241,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/add_sso_user_api_response.rb b/client/lib/fastcomments-client/models/add_sso_user_api_response.rb index 92014f1..d29a7de 100644 --- a/client/lib/fastcomments-client/models/add_sso_user_api_response.rb +++ b/client/lib/fastcomments-client/models/add_sso_user_api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class AddSSOUserAPIResponse < ApiModelBase + class AddSSOUserAPIResponse attr_accessor :reason attr_accessor :code @@ -170,6 +170,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -186,6 +241,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/adjust_comment_votes_params.rb b/client/lib/fastcomments-client/models/adjust_comment_votes_params.rb new file mode 100644 index 0000000..f30d550 --- /dev/null +++ b/client/lib/fastcomments-client/models/adjust_comment_votes_params.rb @@ -0,0 +1,237 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class AdjustCommentVotesParams + attr_accessor :adjust_vote_amount + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'adjust_vote_amount' => :'adjustVoteAmount' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'adjust_vote_amount' => :'Float' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::AdjustCommentVotesParams` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::AdjustCommentVotesParams`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'adjust_vote_amount') + self.adjust_vote_amount = attributes[:'adjust_vote_amount'] + else + self.adjust_vote_amount = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @adjust_vote_amount.nil? + invalid_properties.push('invalid value for "adjust_vote_amount", adjust_vote_amount cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @adjust_vote_amount.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] adjust_vote_amount Value to be assigned + def adjust_vote_amount=(adjust_vote_amount) + if adjust_vote_amount.nil? + fail ArgumentError, 'adjust_vote_amount cannot be nil' + end + + @adjust_vote_amount = adjust_vote_amount + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + adjust_vote_amount == o.adjust_vote_amount + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [adjust_vote_amount].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/adjust_votes_response.rb b/client/lib/fastcomments-client/models/adjust_votes_response.rb new file mode 100644 index 0000000..8d1985f --- /dev/null +++ b/client/lib/fastcomments-client/models/adjust_votes_response.rb @@ -0,0 +1,263 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class AdjustVotesResponse + attr_accessor :status + + attr_accessor :new_comment_votes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'new_comment_votes' => :'newCommentVotes' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'String', + :'new_comment_votes' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::AdjustVotesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::AdjustVotesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'new_comment_votes') + self.new_comment_votes = attributes[:'new_comment_votes'] + else + self.new_comment_votes = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @new_comment_votes.nil? + invalid_properties.push('invalid value for "new_comment_votes", new_comment_votes cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + return false if @new_comment_votes.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] new_comment_votes Value to be assigned + def new_comment_votes=(new_comment_votes) + if new_comment_votes.nil? + fail ArgumentError, 'new_comment_votes cannot be nil' + end + + @new_comment_votes = new_comment_votes + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + new_comment_votes == o.new_comment_votes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, new_comment_votes].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/aggregate_question_results_response.rb b/client/lib/fastcomments-client/models/aggregate_question_results_response.rb index d3c06ca..08b80e2 100644 --- a/client/lib/fastcomments-client/models/aggregate_question_results_response.rb +++ b/client/lib/fastcomments-client/models/aggregate_question_results_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class AggregateQuestionResultsResponse < ApiModelBase + class AggregateQuestionResultsResponse attr_accessor :status attr_accessor :data @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/add_domain_config200_response.rb b/client/lib/fastcomments-client/models/aggregate_response.rb similarity index 94% rename from client/lib/fastcomments-client/models/add_domain_config200_response.rb rename to client/lib/fastcomments-client/models/aggregate_response.rb index d8a102d..89c69bb 100644 --- a/client/lib/fastcomments-client/models/add_domain_config200_response.rb +++ b/client/lib/fastcomments-client/models/aggregate_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,13 +14,13 @@ require 'time' module FastCommentsClient - module AddDomainConfig200Response + module AggregateResponse class << self # List of class defined in anyOf (OpenAPI v3) def openapi_any_of [ - :'AddDomainConfig200ResponseAnyOf', - :'GetDomainConfigs200ResponseAnyOf1' + :'AggregationAPIError', + :'AggregationResponse' ] end @@ -37,7 +37,8 @@ def build(data) openapi_any_of.each do |klass| begin next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data rescue # rescue all errors so we keep iterating even if the current item lookup raises end end diff --git a/client/lib/fastcomments-client/models/aggregate_time_bucket.rb b/client/lib/fastcomments-client/models/aggregate_time_bucket.rb index 792ce51..0f5854e 100644 --- a/client/lib/fastcomments-client/models/aggregate_time_bucket.rb +++ b/client/lib/fastcomments-client/models/aggregate_time_bucket.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/aggregation_api_error.rb b/client/lib/fastcomments-client/models/aggregation_api_error.rb new file mode 100644 index 0000000..c0115f2 --- /dev/null +++ b/client/lib/fastcomments-client/models/aggregation_api_error.rb @@ -0,0 +1,322 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class AggregationAPIError + attr_accessor :status + + attr_accessor :reason + + attr_accessor :code + + attr_accessor :valid_resource_names + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'reason' => :'reason', + :'code' => :'code', + :'valid_resource_names' => :'validResourceNames' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'APIStatus', + :'reason' => :'String', + :'code' => :'String', + :'valid_resource_names' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::AggregationAPIError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::AggregationAPIError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'reason') + self.reason = attributes[:'reason'] + else + self.reason = nil + end + + if attributes.key?(:'code') + self.code = attributes[:'code'] + else + self.code = nil + end + + if attributes.key?(:'valid_resource_names') + if (value = attributes[:'valid_resource_names']).is_a?(Array) + self.valid_resource_names = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @reason.nil? + invalid_properties.push('invalid value for "reason", reason cannot be nil.') + end + + if @code.nil? + invalid_properties.push('invalid value for "code", code cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + return false if @reason.nil? + return false if @code.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] reason Value to be assigned + def reason=(reason) + if reason.nil? + fail ArgumentError, 'reason cannot be nil' + end + + @reason = reason + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if code.nil? + fail ArgumentError, 'code cannot be nil' + end + + @code = code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + reason == o.reason && + code == o.code && + valid_resource_names == o.valid_resource_names + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, reason, code, valid_resource_names].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/aggregation_item.rb b/client/lib/fastcomments-client/models/aggregation_item.rb index 64893e4..746f943 100644 --- a/client/lib/fastcomments-client/models/aggregation_item.rb +++ b/client/lib/fastcomments-client/models/aggregation_item.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class AggregationItem < ApiModelBase + class AggregationItem # Construct a type with a set of properties K of type T attr_accessor :groups @@ -129,6 +129,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -145,6 +200,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/aggregation_op_type.rb b/client/lib/fastcomments-client/models/aggregation_op_type.rb index 9654611..fadfdb5 100644 --- a/client/lib/fastcomments-client/models/aggregation_op_type.rb +++ b/client/lib/fastcomments-client/models/aggregation_op_type.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/aggregation_operation.rb b/client/lib/fastcomments-client/models/aggregation_operation.rb index 3f173fe..5f87916 100644 --- a/client/lib/fastcomments-client/models/aggregation_operation.rb +++ b/client/lib/fastcomments-client/models/aggregation_operation.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -15,7 +15,7 @@ module FastCommentsClient # An operation that will be applied on a field - class AggregationOperation < ApiModelBase + class AggregationOperation # The field to operate on attr_accessor :field @@ -212,6 +212,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -228,6 +283,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/aggregation_request.rb b/client/lib/fastcomments-client/models/aggregation_request.rb index f375e17..fb9516e 100644 --- a/client/lib/fastcomments-client/models/aggregation_request.rb +++ b/client/lib/fastcomments-client/models/aggregation_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -15,7 +15,7 @@ module FastCommentsClient # The aggregation request accepts a resource, optional grouping keys, an array of operations, and an optional sort - class AggregationRequest < ApiModelBase + class AggregationRequest attr_accessor :query attr_accessor :resource_name @@ -203,6 +203,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -219,6 +274,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/aggregation_request_sort.rb b/client/lib/fastcomments-client/models/aggregation_request_sort.rb index d9fd644..f672889 100644 --- a/client/lib/fastcomments-client/models/aggregation_request_sort.rb +++ b/client/lib/fastcomments-client/models/aggregation_request_sort.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class AggregationRequestSort < ApiModelBase + class AggregationRequestSort attr_accessor :dir attr_accessor :field @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/aggregation_response.rb b/client/lib/fastcomments-client/models/aggregation_response.rb index ddc99d1..b41e3d0 100644 --- a/client/lib/fastcomments-client/models/aggregation_response.rb +++ b/client/lib/fastcomments-client/models/aggregation_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -15,7 +15,7 @@ module FastCommentsClient # The API response returns the aggregated data along with simple stats - class AggregationResponse < ApiModelBase + class AggregationResponse attr_accessor :status attr_accessor :data @@ -203,6 +203,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -219,6 +274,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/aggregation_response_stats.rb b/client/lib/fastcomments-client/models/aggregation_response_stats.rb index ecaac47..2a86e0f 100644 --- a/client/lib/fastcomments-client/models/aggregation_response_stats.rb +++ b/client/lib/fastcomments-client/models/aggregation_response_stats.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class AggregationResponseStats < ApiModelBase + class AggregationResponseStats attr_accessor :time_ms attr_accessor :scanned @@ -169,6 +169,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -185,6 +240,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/aggregation_value.rb b/client/lib/fastcomments-client/models/aggregation_value.rb index 2ba8c67..f611301 100644 --- a/client/lib/fastcomments-client/models/aggregation_value.rb +++ b/client/lib/fastcomments-client/models/aggregation_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class AggregationValue < ApiModelBase + class AggregationValue # Construct a type with a set of properties K of type T attr_accessor :groups @@ -168,6 +168,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -184,6 +239,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_audit_log.rb b/client/lib/fastcomments-client/models/api_audit_log.rb index d465975..20ea1d2 100644 --- a/client/lib/fastcomments-client/models/api_audit_log.rb +++ b/client/lib/fastcomments-client/models/api_audit_log.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APIAuditLog < ApiModelBase + class APIAuditLog attr_accessor :_id attr_accessor :user_id @@ -318,6 +318,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -334,6 +389,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_ban_user_change_log.rb b/client/lib/fastcomments-client/models/api_ban_user_change_log.rb new file mode 100644 index 0000000..ee071df --- /dev/null +++ b/client/lib/fastcomments-client/models/api_ban_user_change_log.rb @@ -0,0 +1,249 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class APIBanUserChangeLog + attr_accessor :created_banned_user_id + + attr_accessor :updated_banned_user_id + + attr_accessor :deleted_banned_users + + attr_accessor :changed_values_before + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'created_banned_user_id' => :'createdBannedUserId', + :'updated_banned_user_id' => :'updatedBannedUserId', + :'deleted_banned_users' => :'deletedBannedUsers', + :'changed_values_before' => :'changedValuesBefore' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'created_banned_user_id' => :'String', + :'updated_banned_user_id' => :'String', + :'deleted_banned_users' => :'Array', + :'changed_values_before' => :'APIBanUserChangedValues' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::APIBanUserChangeLog` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::APIBanUserChangeLog`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'created_banned_user_id') + self.created_banned_user_id = attributes[:'created_banned_user_id'] + end + + if attributes.key?(:'updated_banned_user_id') + self.updated_banned_user_id = attributes[:'updated_banned_user_id'] + end + + if attributes.key?(:'deleted_banned_users') + if (value = attributes[:'deleted_banned_users']).is_a?(Array) + self.deleted_banned_users = value + end + end + + if attributes.key?(:'changed_values_before') + self.changed_values_before = attributes[:'changed_values_before'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + created_banned_user_id == o.created_banned_user_id && + updated_banned_user_id == o.updated_banned_user_id && + deleted_banned_users == o.deleted_banned_users && + changed_values_before == o.changed_values_before + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [created_banned_user_id, updated_banned_user_id, deleted_banned_users, changed_values_before].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/api_ban_user_changed_values.rb b/client/lib/fastcomments-client/models/api_ban_user_changed_values.rb new file mode 100644 index 0000000..754c0e2 --- /dev/null +++ b/client/lib/fastcomments-client/models/api_ban_user_changed_values.rb @@ -0,0 +1,333 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class APIBanUserChangedValues + attr_accessor :_id + + attr_accessor :tenant_id + + attr_accessor :user_id + + attr_accessor :email + + attr_accessor :username + + attr_accessor :ip_hash + + attr_accessor :created_at + + attr_accessor :banned_by_user_id + + attr_accessor :banned_comment_text + + attr_accessor :ban_type + + attr_accessor :banned_until + + attr_accessor :has_email_wildcard + + attr_accessor :ban_reason + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_id' => :'_id', + :'tenant_id' => :'tenantId', + :'user_id' => :'userId', + :'email' => :'email', + :'username' => :'username', + :'ip_hash' => :'ipHash', + :'created_at' => :'createdAt', + :'banned_by_user_id' => :'bannedByUserId', + :'banned_comment_text' => :'bannedCommentText', + :'ban_type' => :'banType', + :'banned_until' => :'bannedUntil', + :'has_email_wildcard' => :'hasEmailWildcard', + :'ban_reason' => :'banReason' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'_id' => :'String', + :'tenant_id' => :'String', + :'user_id' => :'String', + :'email' => :'String', + :'username' => :'String', + :'ip_hash' => :'String', + :'created_at' => :'Time', + :'banned_by_user_id' => :'String', + :'banned_comment_text' => :'String', + :'ban_type' => :'String', + :'banned_until' => :'Time', + :'has_email_wildcard' => :'Boolean', + :'ban_reason' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'user_id', + :'email', + :'username', + :'ip_hash', + :'banned_until', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::APIBanUserChangedValues` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::APIBanUserChangedValues`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'_id') + self._id = attributes[:'_id'] + end + + if attributes.key?(:'tenant_id') + self.tenant_id = attributes[:'tenant_id'] + end + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + + if attributes.key?(:'ip_hash') + self.ip_hash = attributes[:'ip_hash'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'banned_by_user_id') + self.banned_by_user_id = attributes[:'banned_by_user_id'] + end + + if attributes.key?(:'banned_comment_text') + self.banned_comment_text = attributes[:'banned_comment_text'] + end + + if attributes.key?(:'ban_type') + self.ban_type = attributes[:'ban_type'] + end + + if attributes.key?(:'banned_until') + self.banned_until = attributes[:'banned_until'] + end + + if attributes.key?(:'has_email_wildcard') + self.has_email_wildcard = attributes[:'has_email_wildcard'] + end + + if attributes.key?(:'ban_reason') + self.ban_reason = attributes[:'ban_reason'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _id == o._id && + tenant_id == o.tenant_id && + user_id == o.user_id && + email == o.email && + username == o.username && + ip_hash == o.ip_hash && + created_at == o.created_at && + banned_by_user_id == o.banned_by_user_id && + banned_comment_text == o.banned_comment_text && + ban_type == o.ban_type && + banned_until == o.banned_until && + has_email_wildcard == o.has_email_wildcard && + ban_reason == o.ban_reason + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [_id, tenant_id, user_id, email, username, ip_hash, created_at, banned_by_user_id, banned_comment_text, ban_type, banned_until, has_email_wildcard, ban_reason].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/api_banned_user.rb b/client/lib/fastcomments-client/models/api_banned_user.rb new file mode 100644 index 0000000..0fc2679 --- /dev/null +++ b/client/lib/fastcomments-client/models/api_banned_user.rb @@ -0,0 +1,454 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class APIBannedUser + attr_accessor :_id + + attr_accessor :tenant_id + + attr_accessor :user_id + + attr_accessor :email + + attr_accessor :username + + attr_accessor :ip_hash + + attr_accessor :created_at + + attr_accessor :banned_by_user_id + + attr_accessor :banned_comment_text + + attr_accessor :ban_type + + attr_accessor :banned_until + + attr_accessor :has_email_wildcard + + attr_accessor :ban_reason + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_id' => :'_id', + :'tenant_id' => :'tenantId', + :'user_id' => :'userId', + :'email' => :'email', + :'username' => :'username', + :'ip_hash' => :'ipHash', + :'created_at' => :'createdAt', + :'banned_by_user_id' => :'bannedByUserId', + :'banned_comment_text' => :'bannedCommentText', + :'ban_type' => :'banType', + :'banned_until' => :'bannedUntil', + :'has_email_wildcard' => :'hasEmailWildcard', + :'ban_reason' => :'banReason' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'_id' => :'String', + :'tenant_id' => :'String', + :'user_id' => :'String', + :'email' => :'String', + :'username' => :'String', + :'ip_hash' => :'String', + :'created_at' => :'Time', + :'banned_by_user_id' => :'String', + :'banned_comment_text' => :'String', + :'ban_type' => :'String', + :'banned_until' => :'Time', + :'has_email_wildcard' => :'Boolean', + :'ban_reason' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'user_id', + :'email', + :'username', + :'ip_hash', + :'banned_until', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::APIBannedUser` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::APIBannedUser`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'_id') + self._id = attributes[:'_id'] + else + self._id = nil + end + + if attributes.key?(:'tenant_id') + self.tenant_id = attributes[:'tenant_id'] + else + self.tenant_id = nil + end + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + + if attributes.key?(:'ip_hash') + self.ip_hash = attributes[:'ip_hash'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + else + self.created_at = nil + end + + if attributes.key?(:'banned_by_user_id') + self.banned_by_user_id = attributes[:'banned_by_user_id'] + else + self.banned_by_user_id = nil + end + + if attributes.key?(:'banned_comment_text') + self.banned_comment_text = attributes[:'banned_comment_text'] + else + self.banned_comment_text = nil + end + + if attributes.key?(:'ban_type') + self.ban_type = attributes[:'ban_type'] + else + self.ban_type = nil + end + + if attributes.key?(:'banned_until') + self.banned_until = attributes[:'banned_until'] + else + self.banned_until = nil + end + + if attributes.key?(:'has_email_wildcard') + self.has_email_wildcard = attributes[:'has_email_wildcard'] + else + self.has_email_wildcard = nil + end + + if attributes.key?(:'ban_reason') + self.ban_reason = attributes[:'ban_reason'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @_id.nil? + invalid_properties.push('invalid value for "_id", _id cannot be nil.') + end + + if @tenant_id.nil? + invalid_properties.push('invalid value for "tenant_id", tenant_id cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @banned_by_user_id.nil? + invalid_properties.push('invalid value for "banned_by_user_id", banned_by_user_id cannot be nil.') + end + + if @banned_comment_text.nil? + invalid_properties.push('invalid value for "banned_comment_text", banned_comment_text cannot be nil.') + end + + if @ban_type.nil? + invalid_properties.push('invalid value for "ban_type", ban_type cannot be nil.') + end + + if @has_email_wildcard.nil? + invalid_properties.push('invalid value for "has_email_wildcard", has_email_wildcard cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @_id.nil? + return false if @tenant_id.nil? + return false if @created_at.nil? + return false if @banned_by_user_id.nil? + return false if @banned_comment_text.nil? + return false if @ban_type.nil? + return false if @has_email_wildcard.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] _id Value to be assigned + def _id=(_id) + if _id.nil? + fail ArgumentError, '_id cannot be nil' + end + + @_id = _id + end + + # Custom attribute writer method with validation + # @param [Object] tenant_id Value to be assigned + def tenant_id=(tenant_id) + if tenant_id.nil? + fail ArgumentError, 'tenant_id cannot be nil' + end + + @tenant_id = tenant_id + end + + # Custom attribute writer method with validation + # @param [Object] created_at Value to be assigned + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'created_at cannot be nil' + end + + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param [Object] banned_by_user_id Value to be assigned + def banned_by_user_id=(banned_by_user_id) + if banned_by_user_id.nil? + fail ArgumentError, 'banned_by_user_id cannot be nil' + end + + @banned_by_user_id = banned_by_user_id + end + + # Custom attribute writer method with validation + # @param [Object] banned_comment_text Value to be assigned + def banned_comment_text=(banned_comment_text) + if banned_comment_text.nil? + fail ArgumentError, 'banned_comment_text cannot be nil' + end + + @banned_comment_text = banned_comment_text + end + + # Custom attribute writer method with validation + # @param [Object] ban_type Value to be assigned + def ban_type=(ban_type) + if ban_type.nil? + fail ArgumentError, 'ban_type cannot be nil' + end + + @ban_type = ban_type + end + + # Custom attribute writer method with validation + # @param [Object] has_email_wildcard Value to be assigned + def has_email_wildcard=(has_email_wildcard) + if has_email_wildcard.nil? + fail ArgumentError, 'has_email_wildcard cannot be nil' + end + + @has_email_wildcard = has_email_wildcard + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _id == o._id && + tenant_id == o.tenant_id && + user_id == o.user_id && + email == o.email && + username == o.username && + ip_hash == o.ip_hash && + created_at == o.created_at && + banned_by_user_id == o.banned_by_user_id && + banned_comment_text == o.banned_comment_text && + ban_type == o.ban_type && + banned_until == o.banned_until && + has_email_wildcard == o.has_email_wildcard && + ban_reason == o.ban_reason + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [_id, tenant_id, user_id, email, username, ip_hash, created_at, banned_by_user_id, banned_comment_text, ban_type, banned_until, has_email_wildcard, ban_reason].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/api_banned_user_with_multi_match_info.rb b/client/lib/fastcomments-client/models/api_banned_user_with_multi_match_info.rb new file mode 100644 index 0000000..1f8fecc --- /dev/null +++ b/client/lib/fastcomments-client/models/api_banned_user_with_multi_match_info.rb @@ -0,0 +1,375 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class APIBannedUserWithMultiMatchInfo + attr_accessor :_id + + attr_accessor :user_id + + attr_accessor :ban_type + + attr_accessor :email + + attr_accessor :ip_hash + + attr_accessor :banned_until + + attr_accessor :has_email_wildcard + + attr_accessor :ban_reason + + attr_accessor :matches + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_id' => :'_id', + :'user_id' => :'userId', + :'ban_type' => :'banType', + :'email' => :'email', + :'ip_hash' => :'ipHash', + :'banned_until' => :'bannedUntil', + :'has_email_wildcard' => :'hasEmailWildcard', + :'ban_reason' => :'banReason', + :'matches' => :'matches' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'_id' => :'String', + :'user_id' => :'String', + :'ban_type' => :'String', + :'email' => :'String', + :'ip_hash' => :'String', + :'banned_until' => :'Time', + :'has_email_wildcard' => :'Boolean', + :'ban_reason' => :'String', + :'matches' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'user_id', + :'email', + :'ip_hash', + :'banned_until', + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'APICommentCommonBannedUser' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::APIBannedUserWithMultiMatchInfo` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::APIBannedUserWithMultiMatchInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'_id') + self._id = attributes[:'_id'] + else + self._id = nil + end + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'ban_type') + self.ban_type = attributes[:'ban_type'] + else + self.ban_type = nil + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'ip_hash') + self.ip_hash = attributes[:'ip_hash'] + end + + if attributes.key?(:'banned_until') + self.banned_until = attributes[:'banned_until'] + else + self.banned_until = nil + end + + if attributes.key?(:'has_email_wildcard') + self.has_email_wildcard = attributes[:'has_email_wildcard'] + else + self.has_email_wildcard = nil + end + + if attributes.key?(:'ban_reason') + self.ban_reason = attributes[:'ban_reason'] + end + + if attributes.key?(:'matches') + if (value = attributes[:'matches']).is_a?(Array) + self.matches = value + end + else + self.matches = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @_id.nil? + invalid_properties.push('invalid value for "_id", _id cannot be nil.') + end + + if @ban_type.nil? + invalid_properties.push('invalid value for "ban_type", ban_type cannot be nil.') + end + + if @has_email_wildcard.nil? + invalid_properties.push('invalid value for "has_email_wildcard", has_email_wildcard cannot be nil.') + end + + if @matches.nil? + invalid_properties.push('invalid value for "matches", matches cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @_id.nil? + return false if @ban_type.nil? + return false if @has_email_wildcard.nil? + return false if @matches.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] _id Value to be assigned + def _id=(_id) + if _id.nil? + fail ArgumentError, '_id cannot be nil' + end + + @_id = _id + end + + # Custom attribute writer method with validation + # @param [Object] ban_type Value to be assigned + def ban_type=(ban_type) + if ban_type.nil? + fail ArgumentError, 'ban_type cannot be nil' + end + + @ban_type = ban_type + end + + # Custom attribute writer method with validation + # @param [Object] has_email_wildcard Value to be assigned + def has_email_wildcard=(has_email_wildcard) + if has_email_wildcard.nil? + fail ArgumentError, 'has_email_wildcard cannot be nil' + end + + @has_email_wildcard = has_email_wildcard + end + + # Custom attribute writer method with validation + # @param [Object] matches Value to be assigned + def matches=(matches) + if matches.nil? + fail ArgumentError, 'matches cannot be nil' + end + + @matches = matches + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _id == o._id && + user_id == o.user_id && + ban_type == o.ban_type && + email == o.email && + ip_hash == o.ip_hash && + banned_until == o.banned_until && + has_email_wildcard == o.has_email_wildcard && + ban_reason == o.ban_reason && + matches == o.matches + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [_id, user_id, ban_type, email, ip_hash, banned_until, has_email_wildcard, ban_reason, matches].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/api_comment.rb b/client/lib/fastcomments-client/models/api_comment.rb index 630f987..7371255 100644 --- a/client/lib/fastcomments-client/models/api_comment.rb +++ b/client/lib/fastcomments-client/models/api_comment.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,8 +14,8 @@ require 'time' module FastCommentsClient - class APIComment < ApiModelBase - attr_accessor :_id + class APIComment + attr_accessor :id attr_accessor :ai_determined_spam @@ -124,7 +124,7 @@ class APIComment < ApiModelBase # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'_id' => :'_id', + :'id' => :'id', :'ai_determined_spam' => :'aiDeterminedSpam', :'anon_user_id' => :'anonUserId', :'approved' => :'approved', @@ -193,7 +193,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'_id' => :'String', + :'id' => :'String', :'ai_determined_spam' => :'Boolean', :'anon_user_id' => :'String', :'approved' => :'Boolean', @@ -304,10 +304,10 @@ def initialize(attributes = {}) h[k.to_sym] = v } - if attributes.key?(:'_id') - self._id = attributes[:'_id'] + if attributes.key?(:'id') + self.id = attributes[:'id'] else - self._id = nil + self.id = nil end if attributes.key?(:'ai_determined_spam') @@ -554,8 +554,8 @@ def initialize(attributes = {}) def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new - if @_id.nil? - invalid_properties.push('invalid value for "_id", _id cannot be nil.') + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') end if @approved.nil? @@ -597,7 +597,7 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @_id.nil? + return false if @id.nil? return false if @approved.nil? return false if @comment.nil? return false if @comment_html.nil? @@ -610,13 +610,13 @@ def valid? end # Custom attribute writer method with validation - # @param [Object] _id Value to be assigned - def _id=(_id) - if _id.nil? - fail ArgumentError, '_id cannot be nil' + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' end - @_id = _id + @id = id end # Custom attribute writer method with validation @@ -704,7 +704,7 @@ def verified=(verified) def ==(o) return true if self.equal?(o) self.class == o.class && - _id == o._id && + id == o.id && ai_determined_spam == o.ai_determined_spam && anon_user_id == o.anon_user_id && approved == o.approved && @@ -768,7 +768,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [_id, ai_determined_spam, anon_user_id, approved, avatar_src, badges, comment, comment_html, commenter_email, commenter_link, commenter_name, date, display_label, domain, external_id, external_parent_id, expire_at, feedback_ids, flag_count, from_product_id, has_code, has_images, has_links, hash_tags, is_by_admin, is_by_moderator, is_deleted, is_deleted_user, is_pinned, is_locked, is_spam, local_date_hours, local_date_string, locale, mentions, meta, moderation_group_ids, notification_sent_for_parent, notification_sent_for_parent_tenant, page_title, parent_id, rating, reviewed, tenant_id, url, url_id, url_id_raw, user_id, verified, verified_date, votes, votes_down, votes_up].hash + [id, ai_determined_spam, anon_user_id, approved, avatar_src, badges, comment, comment_html, commenter_email, commenter_link, commenter_name, date, display_label, domain, external_id, external_parent_id, expire_at, feedback_ids, flag_count, from_product_id, has_code, has_images, has_links, hash_tags, is_by_admin, is_by_moderator, is_deleted, is_deleted_user, is_pinned, is_locked, is_spam, local_date_hours, local_date_string, locale, mentions, meta, moderation_group_ids, notification_sent_for_parent, notification_sent_for_parent_tenant, page_title, parent_id, rating, reviewed, tenant_id, url, url_id, url_id_raw, user_id, verified, verified_date, votes, votes_down, votes_up].hash end # Builds the object from hash @@ -794,6 +794,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -810,6 +865,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_comment_base.rb b/client/lib/fastcomments-client/models/api_comment_base.rb index 9377daa..37b0e79 100644 --- a/client/lib/fastcomments-client/models/api_comment_base.rb +++ b/client/lib/fastcomments-client/models/api_comment_base.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,8 +14,8 @@ require 'time' module FastCommentsClient - class APICommentBase < ApiModelBase - attr_accessor :_id + class APICommentBase + attr_accessor :id attr_accessor :ai_determined_spam @@ -124,7 +124,7 @@ class APICommentBase < ApiModelBase # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'_id' => :'_id', + :'id' => :'id', :'ai_determined_spam' => :'aiDeterminedSpam', :'anon_user_id' => :'anonUserId', :'approved' => :'approved', @@ -193,7 +193,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'_id' => :'String', + :'id' => :'String', :'ai_determined_spam' => :'Boolean', :'anon_user_id' => :'String', :'approved' => :'Boolean', @@ -297,10 +297,10 @@ def initialize(attributes = {}) h[k.to_sym] = v } - if attributes.key?(:'_id') - self._id = attributes[:'_id'] + if attributes.key?(:'id') + self.id = attributes[:'id'] else - self._id = nil + self.id = nil end if attributes.key?(:'ai_determined_spam') @@ -547,8 +547,8 @@ def initialize(attributes = {}) def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new - if @_id.nil? - invalid_properties.push('invalid value for "_id", _id cannot be nil.') + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') end if @approved.nil? @@ -590,7 +590,7 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @_id.nil? + return false if @id.nil? return false if @approved.nil? return false if @comment.nil? return false if @comment_html.nil? @@ -603,13 +603,13 @@ def valid? end # Custom attribute writer method with validation - # @param [Object] _id Value to be assigned - def _id=(_id) - if _id.nil? - fail ArgumentError, '_id cannot be nil' + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' end - @_id = _id + @id = id end # Custom attribute writer method with validation @@ -697,7 +697,7 @@ def verified=(verified) def ==(o) return true if self.equal?(o) self.class == o.class && - _id == o._id && + id == o.id && ai_determined_spam == o.ai_determined_spam && anon_user_id == o.anon_user_id && approved == o.approved && @@ -761,7 +761,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [_id, ai_determined_spam, anon_user_id, approved, avatar_src, badges, comment, comment_html, commenter_email, commenter_link, commenter_name, date, display_label, domain, external_id, external_parent_id, expire_at, feedback_ids, flag_count, from_product_id, has_code, has_images, has_links, hash_tags, is_by_admin, is_by_moderator, is_deleted, is_deleted_user, is_pinned, is_locked, is_spam, local_date_hours, local_date_string, locale, mentions, meta, moderation_group_ids, notification_sent_for_parent, notification_sent_for_parent_tenant, page_title, parent_id, rating, reviewed, tenant_id, url, url_id, url_id_raw, user_id, verified, verified_date, votes, votes_down, votes_up].hash + [id, ai_determined_spam, anon_user_id, approved, avatar_src, badges, comment, comment_html, commenter_email, commenter_link, commenter_name, date, display_label, domain, external_id, external_parent_id, expire_at, feedback_ids, flag_count, from_product_id, has_code, has_images, has_links, hash_tags, is_by_admin, is_by_moderator, is_deleted, is_deleted_user, is_pinned, is_locked, is_spam, local_date_hours, local_date_string, locale, mentions, meta, moderation_group_ids, notification_sent_for_parent, notification_sent_for_parent_tenant, page_title, parent_id, rating, reviewed, tenant_id, url, url_id, url_id_raw, user_id, verified, verified_date, votes, votes_down, votes_up].hash end # Builds the object from hash @@ -787,6 +787,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -803,6 +858,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_comment_base_meta.rb b/client/lib/fastcomments-client/models/api_comment_base_meta.rb index 289befc..c63aa6f 100644 --- a/client/lib/fastcomments-client/models/api_comment_base_meta.rb +++ b/client/lib/fastcomments-client/models/api_comment_base_meta.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APICommentBaseMeta < ApiModelBase + class APICommentBaseMeta attr_accessor :wp_user_id attr_accessor :wp_post_id @@ -135,6 +135,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -151,6 +206,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_comment_common_banned_user.rb b/client/lib/fastcomments-client/models/api_comment_common_banned_user.rb new file mode 100644 index 0000000..b18c65f --- /dev/null +++ b/client/lib/fastcomments-client/models/api_comment_common_banned_user.rb @@ -0,0 +1,340 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class APICommentCommonBannedUser + attr_accessor :_id + + attr_accessor :user_id + + attr_accessor :ban_type + + attr_accessor :email + + attr_accessor :ip_hash + + attr_accessor :banned_until + + attr_accessor :has_email_wildcard + + attr_accessor :ban_reason + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_id' => :'_id', + :'user_id' => :'userId', + :'ban_type' => :'banType', + :'email' => :'email', + :'ip_hash' => :'ipHash', + :'banned_until' => :'bannedUntil', + :'has_email_wildcard' => :'hasEmailWildcard', + :'ban_reason' => :'banReason' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'_id' => :'String', + :'user_id' => :'String', + :'ban_type' => :'String', + :'email' => :'String', + :'ip_hash' => :'String', + :'banned_until' => :'Time', + :'has_email_wildcard' => :'Boolean', + :'ban_reason' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'user_id', + :'email', + :'ip_hash', + :'banned_until', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::APICommentCommonBannedUser` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::APICommentCommonBannedUser`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'_id') + self._id = attributes[:'_id'] + else + self._id = nil + end + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'ban_type') + self.ban_type = attributes[:'ban_type'] + else + self.ban_type = nil + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'ip_hash') + self.ip_hash = attributes[:'ip_hash'] + end + + if attributes.key?(:'banned_until') + self.banned_until = attributes[:'banned_until'] + else + self.banned_until = nil + end + + if attributes.key?(:'has_email_wildcard') + self.has_email_wildcard = attributes[:'has_email_wildcard'] + else + self.has_email_wildcard = nil + end + + if attributes.key?(:'ban_reason') + self.ban_reason = attributes[:'ban_reason'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @_id.nil? + invalid_properties.push('invalid value for "_id", _id cannot be nil.') + end + + if @ban_type.nil? + invalid_properties.push('invalid value for "ban_type", ban_type cannot be nil.') + end + + if @has_email_wildcard.nil? + invalid_properties.push('invalid value for "has_email_wildcard", has_email_wildcard cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @_id.nil? + return false if @ban_type.nil? + return false if @has_email_wildcard.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] _id Value to be assigned + def _id=(_id) + if _id.nil? + fail ArgumentError, '_id cannot be nil' + end + + @_id = _id + end + + # Custom attribute writer method with validation + # @param [Object] ban_type Value to be assigned + def ban_type=(ban_type) + if ban_type.nil? + fail ArgumentError, 'ban_type cannot be nil' + end + + @ban_type = ban_type + end + + # Custom attribute writer method with validation + # @param [Object] has_email_wildcard Value to be assigned + def has_email_wildcard=(has_email_wildcard) + if has_email_wildcard.nil? + fail ArgumentError, 'has_email_wildcard cannot be nil' + end + + @has_email_wildcard = has_email_wildcard + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _id == o._id && + user_id == o.user_id && + ban_type == o.ban_type && + email == o.email && + ip_hash == o.ip_hash && + banned_until == o.banned_until && + has_email_wildcard == o.has_email_wildcard && + ban_reason == o.ban_reason + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [_id, user_id, ban_type, email, ip_hash, banned_until, has_email_wildcard, ban_reason].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/api_create_user_badge_response.rb b/client/lib/fastcomments-client/models/api_create_user_badge_response.rb index cc551f0..b67732c 100644 --- a/client/lib/fastcomments-client/models/api_create_user_badge_response.rb +++ b/client/lib/fastcomments-client/models/api_create_user_badge_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APICreateUserBadgeResponse < ApiModelBase + class APICreateUserBadgeResponse attr_accessor :status attr_accessor :user_badge @@ -202,6 +202,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -218,6 +273,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_domain_configuration.rb b/client/lib/fastcomments-client/models/api_domain_configuration.rb index cf0675e..a90308c 100644 --- a/client/lib/fastcomments-client/models/api_domain_configuration.rb +++ b/client/lib/fastcomments-client/models/api_domain_configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APIDomainConfiguration < ApiModelBase + class APIDomainConfiguration attr_accessor :id attr_accessor :domain @@ -334,6 +334,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -350,6 +405,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_empty_response.rb b/client/lib/fastcomments-client/models/api_empty_response.rb index f6e245b..15e3bb3 100644 --- a/client/lib/fastcomments-client/models/api_empty_response.rb +++ b/client/lib/fastcomments-client/models/api_empty_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APIEmptyResponse < ApiModelBase + class APIEmptyResponse attr_accessor :status class EnumAttributeValidator @@ -165,6 +165,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -181,6 +236,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_empty_success_response.rb b/client/lib/fastcomments-client/models/api_empty_success_response.rb index fb8396a..694931e 100644 --- a/client/lib/fastcomments-client/models/api_empty_success_response.rb +++ b/client/lib/fastcomments-client/models/api_empty_success_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APIEmptySuccessResponse < ApiModelBase + class APIEmptySuccessResponse attr_accessor :status class EnumAttributeValidator @@ -165,6 +165,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -181,6 +236,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_error.rb b/client/lib/fastcomments-client/models/api_error.rb index 8cc9794..025c011 100644 --- a/client/lib/fastcomments-client/models/api_error.rb +++ b/client/lib/fastcomments-client/models/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APIError < ApiModelBase + class APIError attr_accessor :status attr_accessor :reason @@ -262,6 +262,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -278,6 +333,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_get_comment_response.rb b/client/lib/fastcomments-client/models/api_get_comment_response.rb index d3fc43e..9a9a9e7 100644 --- a/client/lib/fastcomments-client/models/api_get_comment_response.rb +++ b/client/lib/fastcomments-client/models/api_get_comment_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APIGetCommentResponse < ApiModelBase + class APIGetCommentResponse attr_accessor :status attr_accessor :comment @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_get_comments_response.rb b/client/lib/fastcomments-client/models/api_get_comments_response.rb index 550dd30..5e15f4c 100644 --- a/client/lib/fastcomments-client/models/api_get_comments_response.rb +++ b/client/lib/fastcomments-client/models/api_get_comments_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APIGetCommentsResponse < ApiModelBase + class APIGetCommentsResponse attr_accessor :status attr_accessor :comments @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_get_user_badge_progress_list_response.rb b/client/lib/fastcomments-client/models/api_get_user_badge_progress_list_response.rb index deb317d..e7b380a 100644 --- a/client/lib/fastcomments-client/models/api_get_user_badge_progress_list_response.rb +++ b/client/lib/fastcomments-client/models/api_get_user_badge_progress_list_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APIGetUserBadgeProgressListResponse < ApiModelBase + class APIGetUserBadgeProgressListResponse attr_accessor :status attr_accessor :user_badge_progresses @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_get_user_badge_progress_response.rb b/client/lib/fastcomments-client/models/api_get_user_badge_progress_response.rb index 4bd599e..17a7b9f 100644 --- a/client/lib/fastcomments-client/models/api_get_user_badge_progress_response.rb +++ b/client/lib/fastcomments-client/models/api_get_user_badge_progress_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APIGetUserBadgeProgressResponse < ApiModelBase + class APIGetUserBadgeProgressResponse attr_accessor :status attr_accessor :user_badge_progress @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_get_user_badge_response.rb b/client/lib/fastcomments-client/models/api_get_user_badge_response.rb index e9118db..30f4404 100644 --- a/client/lib/fastcomments-client/models/api_get_user_badge_response.rb +++ b/client/lib/fastcomments-client/models/api_get_user_badge_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APIGetUserBadgeResponse < ApiModelBase + class APIGetUserBadgeResponse attr_accessor :status attr_accessor :user_badge @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_get_user_badges_response.rb b/client/lib/fastcomments-client/models/api_get_user_badges_response.rb index affca6b..ce20ca9 100644 --- a/client/lib/fastcomments-client/models/api_get_user_badges_response.rb +++ b/client/lib/fastcomments-client/models/api_get_user_badges_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APIGetUserBadgesResponse < ApiModelBase + class APIGetUserBadgesResponse attr_accessor :status attr_accessor :user_badges @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_moderate_get_user_ban_preferences_response.rb b/client/lib/fastcomments-client/models/api_moderate_get_user_ban_preferences_response.rb new file mode 100644 index 0000000..02bc065 --- /dev/null +++ b/client/lib/fastcomments-client/models/api_moderate_get_user_ban_preferences_response.rb @@ -0,0 +1,271 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class APIModerateGetUserBanPreferencesResponse + attr_accessor :preferences + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'preferences' => :'preferences', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'preferences' => :'APIModerateUserBanPreferences', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'preferences', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::APIModerateGetUserBanPreferencesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::APIModerateGetUserBanPreferencesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'preferences') + self.preferences = attributes[:'preferences'] + else + self.preferences = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + preferences == o.preferences && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [preferences, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/api_moderate_user_ban_preferences.rb b/client/lib/fastcomments-client/models/api_moderate_user_ban_preferences.rb new file mode 100644 index 0000000..b89d3f9 --- /dev/null +++ b/client/lib/fastcomments-client/models/api_moderate_user_ban_preferences.rb @@ -0,0 +1,315 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class APIModerateUserBanPreferences + attr_accessor :should_ban_email + + attr_accessor :should_ban_by_ip + + attr_accessor :last_ban_type + + attr_accessor :last_ban_duration + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'should_ban_email' => :'shouldBanEmail', + :'should_ban_by_ip' => :'shouldBanByIP', + :'last_ban_type' => :'lastBanType', + :'last_ban_duration' => :'lastBanDuration' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'should_ban_email' => :'Boolean', + :'should_ban_by_ip' => :'Boolean', + :'last_ban_type' => :'String', + :'last_ban_duration' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::APIModerateUserBanPreferences` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::APIModerateUserBanPreferences`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'should_ban_email') + self.should_ban_email = attributes[:'should_ban_email'] + else + self.should_ban_email = nil + end + + if attributes.key?(:'should_ban_by_ip') + self.should_ban_by_ip = attributes[:'should_ban_by_ip'] + else + self.should_ban_by_ip = nil + end + + if attributes.key?(:'last_ban_type') + self.last_ban_type = attributes[:'last_ban_type'] + else + self.last_ban_type = nil + end + + if attributes.key?(:'last_ban_duration') + self.last_ban_duration = attributes[:'last_ban_duration'] + else + self.last_ban_duration = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @should_ban_email.nil? + invalid_properties.push('invalid value for "should_ban_email", should_ban_email cannot be nil.') + end + + if @should_ban_by_ip.nil? + invalid_properties.push('invalid value for "should_ban_by_ip", should_ban_by_ip cannot be nil.') + end + + if @last_ban_type.nil? + invalid_properties.push('invalid value for "last_ban_type", last_ban_type cannot be nil.') + end + + if @last_ban_duration.nil? + invalid_properties.push('invalid value for "last_ban_duration", last_ban_duration cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @should_ban_email.nil? + return false if @should_ban_by_ip.nil? + return false if @last_ban_type.nil? + return false if @last_ban_duration.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] should_ban_email Value to be assigned + def should_ban_email=(should_ban_email) + if should_ban_email.nil? + fail ArgumentError, 'should_ban_email cannot be nil' + end + + @should_ban_email = should_ban_email + end + + # Custom attribute writer method with validation + # @param [Object] should_ban_by_ip Value to be assigned + def should_ban_by_ip=(should_ban_by_ip) + if should_ban_by_ip.nil? + fail ArgumentError, 'should_ban_by_ip cannot be nil' + end + + @should_ban_by_ip = should_ban_by_ip + end + + # Custom attribute writer method with validation + # @param [Object] last_ban_type Value to be assigned + def last_ban_type=(last_ban_type) + if last_ban_type.nil? + fail ArgumentError, 'last_ban_type cannot be nil' + end + + @last_ban_type = last_ban_type + end + + # Custom attribute writer method with validation + # @param [Object] last_ban_duration Value to be assigned + def last_ban_duration=(last_ban_duration) + if last_ban_duration.nil? + fail ArgumentError, 'last_ban_duration cannot be nil' + end + + @last_ban_duration = last_ban_duration + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + should_ban_email == o.should_ban_email && + should_ban_by_ip == o.should_ban_by_ip && + last_ban_type == o.last_ban_type && + last_ban_duration == o.last_ban_duration + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [should_ban_email, should_ban_by_ip, last_ban_type, last_ban_duration].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/api_page.rb b/client/lib/fastcomments-client/models/api_page.rb index dcb1bc0..b3a6f21 100644 --- a/client/lib/fastcomments-client/models/api_page.rb +++ b/client/lib/fastcomments-client/models/api_page.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APIPage < ApiModelBase + class APIPage attr_accessor :is_closed attr_accessor :accessible_by_group_ids @@ -302,6 +302,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -318,6 +373,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/save_comment_response.rb b/client/lib/fastcomments-client/models/api_save_comment_response.rb similarity index 71% rename from client/lib/fastcomments-client/models/save_comment_response.rb rename to client/lib/fastcomments-client/models/api_save_comment_response.rb index e85d5a9..8c17e75 100644 --- a/client/lib/fastcomments-client/models/save_comment_response.rb +++ b/client/lib/fastcomments-client/models/api_save_comment_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class SaveCommentResponse < ApiModelBase + class APISaveCommentResponse attr_accessor :status attr_accessor :comment @@ -70,7 +70,7 @@ def self.acceptable_attributes def self.openapi_types { :'status' => :'APIStatus', - :'comment' => :'FComment', + :'comment' => :'APIComment', :'user' => :'UserSessionInfo', :'module_data' => :'Hash' } @@ -87,14 +87,14 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::SaveCommentResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::APISaveCommentResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::SaveCommentResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::APISaveCommentResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -215,6 +215,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -231,6 +286,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_status.rb b/client/lib/fastcomments-client/models/api_status.rb index 4365efd..0612e35 100644 --- a/client/lib/fastcomments-client/models/api_status.rb +++ b/client/lib/fastcomments-client/models/api_status.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/api_tenant.rb b/client/lib/fastcomments-client/models/api_tenant.rb index 83bd4c8..2766edc 100644 --- a/client/lib/fastcomments-client/models/api_tenant.rb +++ b/client/lib/fastcomments-client/models/api_tenant.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APITenant < ApiModelBase + class APITenant attr_accessor :id attr_accessor :name @@ -562,6 +562,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -578,6 +633,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_tenant_daily_usage.rb b/client/lib/fastcomments-client/models/api_tenant_daily_usage.rb index a720fee..97b5351 100644 --- a/client/lib/fastcomments-client/models/api_tenant_daily_usage.rb +++ b/client/lib/fastcomments-client/models/api_tenant_daily_usage.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APITenantDailyUsage < ApiModelBase + class APITenantDailyUsage attr_accessor :id attr_accessor :tenant_id @@ -611,6 +611,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -627,6 +682,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_ticket.rb b/client/lib/fastcomments-client/models/api_ticket.rb index ffcf195..83acd63 100644 --- a/client/lib/fastcomments-client/models/api_ticket.rb +++ b/client/lib/fastcomments-client/models/api_ticket.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APITicket < ApiModelBase + class APITicket attr_accessor :_id attr_accessor :url_id @@ -353,6 +353,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -369,6 +424,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_ticket_detail.rb b/client/lib/fastcomments-client/models/api_ticket_detail.rb index 9596ed0..8013b4a 100644 --- a/client/lib/fastcomments-client/models/api_ticket_detail.rb +++ b/client/lib/fastcomments-client/models/api_ticket_detail.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APITicketDetail < ApiModelBase + class APITicketDetail attr_accessor :_id attr_accessor :url_id @@ -411,6 +411,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -427,6 +482,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_ticket_file.rb b/client/lib/fastcomments-client/models/api_ticket_file.rb index c9d2794..f48d2d5 100644 --- a/client/lib/fastcomments-client/models/api_ticket_file.rb +++ b/client/lib/fastcomments-client/models/api_ticket_file.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APITicketFile < ApiModelBase + class APITicketFile attr_accessor :id attr_accessor :s3_key @@ -360,6 +360,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -376,6 +431,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/api_user_subscription.rb b/client/lib/fastcomments-client/models/api_user_subscription.rb index e002db4..c761e2e 100644 --- a/client/lib/fastcomments-client/models/api_user_subscription.rb +++ b/client/lib/fastcomments-client/models/api_user_subscription.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APIUserSubscription < ApiModelBase + class APIUserSubscription attr_accessor :notification_frequency attr_accessor :created_at @@ -240,6 +240,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -256,6 +311,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/apisso_user.rb b/client/lib/fastcomments-client/models/apisso_user.rb index e7a84ff..878b51b 100644 --- a/client/lib/fastcomments-client/models/apisso_user.rb +++ b/client/lib/fastcomments-client/models/apisso_user.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class APISSOUser < ApiModelBase + class APISSOUser attr_accessor :id attr_accessor :username @@ -503,6 +503,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -519,6 +574,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/award_user_badge_response.rb b/client/lib/fastcomments-client/models/award_user_badge_response.rb new file mode 100644 index 0000000..dc7207e --- /dev/null +++ b/client/lib/fastcomments-client/models/award_user_badge_response.rb @@ -0,0 +1,281 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class AwardUserBadgeResponse + attr_accessor :notes + + attr_accessor :badges + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'notes' => :'notes', + :'badges' => :'badges', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'notes' => :'Array', + :'badges' => :'Array', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::AwardUserBadgeResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::AwardUserBadgeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'notes') + if (value = attributes[:'notes']).is_a?(Array) + self.notes = value + end + end + + if attributes.key?(:'badges') + if (value = attributes[:'badges']).is_a?(Array) + self.badges = value + end + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + notes == o.notes && + badges == o.badges && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [notes, badges, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/ban_user_from_comment_result.rb b/client/lib/fastcomments-client/models/ban_user_from_comment_result.rb new file mode 100644 index 0000000..18a6c4d --- /dev/null +++ b/client/lib/fastcomments-client/models/ban_user_from_comment_result.rb @@ -0,0 +1,264 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class BanUserFromCommentResult + attr_accessor :status + + attr_accessor :changelog + + attr_accessor :code + + attr_accessor :reason + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'changelog' => :'changelog', + :'code' => :'code', + :'reason' => :'reason' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'String', + :'changelog' => :'APIBanUserChangeLog', + :'code' => :'String', + :'reason' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::BanUserFromCommentResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::BanUserFromCommentResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'changelog') + self.changelog = attributes[:'changelog'] + end + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'reason') + self.reason = attributes[:'reason'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + changelog == o.changelog && + code == o.code && + reason == o.reason + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, changelog, code, reason].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/ban_user_undo_params.rb b/client/lib/fastcomments-client/models/ban_user_undo_params.rb new file mode 100644 index 0000000..7b2e2b4 --- /dev/null +++ b/client/lib/fastcomments-client/models/ban_user_undo_params.rb @@ -0,0 +1,237 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class BanUserUndoParams + attr_accessor :changelog + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'changelog' => :'changelog' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'changelog' => :'APIBanUserChangeLog' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::BanUserUndoParams` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::BanUserUndoParams`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'changelog') + self.changelog = attributes[:'changelog'] + else + self.changelog = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @changelog.nil? + invalid_properties.push('invalid value for "changelog", changelog cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @changelog.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] changelog Value to be assigned + def changelog=(changelog) + if changelog.nil? + fail ArgumentError, 'changelog cannot be nil' + end + + @changelog = changelog + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + changelog == o.changelog + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [changelog].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/banned_user_match.rb b/client/lib/fastcomments-client/models/banned_user_match.rb new file mode 100644 index 0000000..99fa09a --- /dev/null +++ b/client/lib/fastcomments-client/models/banned_user_match.rb @@ -0,0 +1,271 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class BannedUserMatch + attr_accessor :matched_on + + attr_accessor :matched_on_value + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'matched_on' => :'matchedOn', + :'matched_on_value' => :'matchedOnValue' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'matched_on' => :'BannedUserMatchType', + :'matched_on_value' => :'BannedUserMatchMatchedOnValue' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'matched_on_value' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::BannedUserMatch` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::BannedUserMatch`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'matched_on') + self.matched_on = attributes[:'matched_on'] + else + self.matched_on = nil + end + + if attributes.key?(:'matched_on_value') + self.matched_on_value = attributes[:'matched_on_value'] + else + self.matched_on_value = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @matched_on.nil? + invalid_properties.push('invalid value for "matched_on", matched_on cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @matched_on.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] matched_on Value to be assigned + def matched_on=(matched_on) + if matched_on.nil? + fail ArgumentError, 'matched_on cannot be nil' + end + + @matched_on = matched_on + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + matched_on == o.matched_on && + matched_on_value == o.matched_on_value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [matched_on, matched_on_value].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/record_string_string_or_number_value.rb b/client/lib/fastcomments-client/models/banned_user_match_matched_on_value.rb similarity index 95% rename from client/lib/fastcomments-client/models/record_string_string_or_number_value.rb rename to client/lib/fastcomments-client/models/banned_user_match_matched_on_value.rb index afa8fcc..4f4e389 100644 --- a/client/lib/fastcomments-client/models/record_string_string_or_number_value.rb +++ b/client/lib/fastcomments-client/models/banned_user_match_matched_on_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - module RecordStringStringOrNumberValue + module BannedUserMatchMatchedOnValue class << self # List of class defined in anyOf (OpenAPI v3) def openapi_any_of @@ -37,7 +37,8 @@ def build(data) openapi_any_of.each do |klass| begin next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data rescue # rescue all errors so we keep iterating even if the current item lookup raises end end diff --git a/client/lib/fastcomments-client/models/banned_user_match_type.rb b/client/lib/fastcomments-client/models/banned_user_match_type.rb new file mode 100644 index 0000000..23e9fac --- /dev/null +++ b/client/lib/fastcomments-client/models/banned_user_match_type.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class BannedUserMatchType + USER_ID = "userId".freeze + EMAIL = "email".freeze + EMAIL_WILDCARD = "email-wildcard".freeze + IP = "IP".freeze + + def self.all_vars + @all_vars ||= [USER_ID, EMAIL, EMAIL_WILDCARD, IP].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if BannedUserMatchType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #BannedUserMatchType" + end + end +end diff --git a/client/lib/fastcomments-client/models/billing_info.rb b/client/lib/fastcomments-client/models/billing_info.rb index bb841df..9e18887 100644 --- a/client/lib/fastcomments-client/models/billing_info.rb +++ b/client/lib/fastcomments-client/models/billing_info.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class BillingInfo < ApiModelBase + class BillingInfo attr_accessor :name attr_accessor :address @@ -294,6 +294,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -310,6 +365,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/block_from_comment_params.rb b/client/lib/fastcomments-client/models/block_from_comment_params.rb index 9763a91..18b4e66 100644 --- a/client/lib/fastcomments-client/models/block_from_comment_params.rb +++ b/client/lib/fastcomments-client/models/block_from_comment_params.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class BlockFromCommentParams < ApiModelBase + class BlockFromCommentParams attr_accessor :comment_ids_to_check # Attribute mapping from ruby-style variable name to JSON key. @@ -128,6 +128,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -144,6 +199,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/block_success.rb b/client/lib/fastcomments-client/models/block_success.rb index 9d88eba..76d1728 100644 --- a/client/lib/fastcomments-client/models/block_success.rb +++ b/client/lib/fastcomments-client/models/block_success.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class BlockSuccess < ApiModelBase + class BlockSuccess attr_accessor :status # Construct a type with a set of properties K of type T @@ -194,6 +194,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -210,6 +265,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/build_moderation_filter_params.rb b/client/lib/fastcomments-client/models/build_moderation_filter_params.rb new file mode 100644 index 0000000..adb0fad --- /dev/null +++ b/client/lib/fastcomments-client/models/build_moderation_filter_params.rb @@ -0,0 +1,290 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class BuildModerationFilterParams + attr_accessor :user_id + + attr_accessor :tenant_id + + attr_accessor :filters + + attr_accessor :search_filters + + attr_accessor :text_search + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'tenant_id' => :'tenantId', + :'filters' => :'filters', + :'search_filters' => :'searchFilters', + :'text_search' => :'textSearch' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_id' => :'String', + :'tenant_id' => :'String', + :'filters' => :'String', + :'search_filters' => :'String', + :'text_search' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::BuildModerationFilterParams` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::BuildModerationFilterParams`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + else + self.user_id = nil + end + + if attributes.key?(:'tenant_id') + self.tenant_id = attributes[:'tenant_id'] + else + self.tenant_id = nil + end + + if attributes.key?(:'filters') + self.filters = attributes[:'filters'] + end + + if attributes.key?(:'search_filters') + self.search_filters = attributes[:'search_filters'] + end + + if attributes.key?(:'text_search') + self.text_search = attributes[:'text_search'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') + end + + if @tenant_id.nil? + invalid_properties.push('invalid value for "tenant_id", tenant_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @user_id.nil? + return false if @tenant_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [Object] tenant_id Value to be assigned + def tenant_id=(tenant_id) + if tenant_id.nil? + fail ArgumentError, 'tenant_id cannot be nil' + end + + @tenant_id = tenant_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_id == o.user_id && + tenant_id == o.tenant_id && + filters == o.filters && + search_filters == o.search_filters && + text_search == o.text_search + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_id, tenant_id, filters, search_filters, text_search].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/build_moderation_filter_response.rb b/client/lib/fastcomments-client/models/build_moderation_filter_response.rb new file mode 100644 index 0000000..72384f1 --- /dev/null +++ b/client/lib/fastcomments-client/models/build_moderation_filter_response.rb @@ -0,0 +1,263 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class BuildModerationFilterResponse + attr_accessor :status + + attr_accessor :moderation_filter + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'moderation_filter' => :'moderationFilter' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'String', + :'moderation_filter' => :'ModerationFilter' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::BuildModerationFilterResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::BuildModerationFilterResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'moderation_filter') + self.moderation_filter = attributes[:'moderation_filter'] + else + self.moderation_filter = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @moderation_filter.nil? + invalid_properties.push('invalid value for "moderation_filter", moderation_filter cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + return false if @moderation_filter.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] moderation_filter Value to be assigned + def moderation_filter=(moderation_filter) + if moderation_filter.nil? + fail ArgumentError, 'moderation_filter cannot be nil' + end + + @moderation_filter = moderation_filter + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + moderation_filter == o.moderation_filter + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, moderation_filter].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/bulk_aggregate_question_item.rb b/client/lib/fastcomments-client/models/bulk_aggregate_question_item.rb index 573da12..464c5a8 100644 --- a/client/lib/fastcomments-client/models/bulk_aggregate_question_item.rb +++ b/client/lib/fastcomments-client/models/bulk_aggregate_question_item.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class BulkAggregateQuestionItem < ApiModelBase + class BulkAggregateQuestionItem attr_accessor :agg_id attr_accessor :question_id @@ -212,6 +212,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -228,6 +283,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/bulk_aggregate_question_results200_response.rb b/client/lib/fastcomments-client/models/bulk_aggregate_question_results200_response.rb deleted file mode 100644 index 5cb32fd..0000000 --- a/client/lib/fastcomments-client/models/bulk_aggregate_question_results200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module BulkAggregateQuestionResults200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'BulkAggregateQuestionResultsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/bulk_aggregate_question_results_request.rb b/client/lib/fastcomments-client/models/bulk_aggregate_question_results_request.rb index 3521ac4..c5b48bd 100644 --- a/client/lib/fastcomments-client/models/bulk_aggregate_question_results_request.rb +++ b/client/lib/fastcomments-client/models/bulk_aggregate_question_results_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class BulkAggregateQuestionResultsRequest < ApiModelBase + class BulkAggregateQuestionResultsRequest attr_accessor :aggregations # Attribute mapping from ruby-style variable name to JSON key. @@ -145,6 +145,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -161,6 +216,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/bulk_aggregate_question_results_response.rb b/client/lib/fastcomments-client/models/bulk_aggregate_question_results_response.rb index 15d1b78..ef11934 100644 --- a/client/lib/fastcomments-client/models/bulk_aggregate_question_results_response.rb +++ b/client/lib/fastcomments-client/models/bulk_aggregate_question_results_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class BulkAggregateQuestionResultsResponse < ApiModelBase + class BulkAggregateQuestionResultsResponse attr_accessor :status # Construct a type with a set of properties K of type T @@ -194,6 +194,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -210,6 +265,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/bulk_create_hash_tags_body.rb b/client/lib/fastcomments-client/models/bulk_create_hash_tags_body.rb index e05b9ae..36ce551 100644 --- a/client/lib/fastcomments-client/models/bulk_create_hash_tags_body.rb +++ b/client/lib/fastcomments-client/models/bulk_create_hash_tags_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class BulkCreateHashTagsBody < ApiModelBase + class BulkCreateHashTagsBody attr_accessor :tenant_id attr_accessor :tags @@ -154,6 +154,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -170,6 +225,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/bulk_create_hash_tags_body_tags_inner.rb b/client/lib/fastcomments-client/models/bulk_create_hash_tags_body_tags_inner.rb index 00f04cb..8b53525 100644 --- a/client/lib/fastcomments-client/models/bulk_create_hash_tags_body_tags_inner.rb +++ b/client/lib/fastcomments-client/models/bulk_create_hash_tags_body_tags_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class BulkCreateHashTagsBodyTagsInner < ApiModelBase + class BulkCreateHashTagsBodyTagsInner attr_accessor :url attr_accessor :tag @@ -152,6 +152,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -168,6 +223,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/bulk_create_hash_tags_response.rb b/client/lib/fastcomments-client/models/bulk_create_hash_tags_response.rb index edd4258..49ce957 100644 --- a/client/lib/fastcomments-client/models/bulk_create_hash_tags_response.rb +++ b/client/lib/fastcomments-client/models/bulk_create_hash_tags_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class BulkCreateHashTagsResponse < ApiModelBase + class BulkCreateHashTagsResponse attr_accessor :status attr_accessor :results @@ -63,7 +63,7 @@ def self.acceptable_attributes def self.openapi_types { :'status' => :'APIStatus', - :'results' => :'Array' + :'results' => :'Array' } end @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/add_hash_tag200_response.rb b/client/lib/fastcomments-client/models/bulk_create_hash_tags_response_results_inner.rb similarity index 95% rename from client/lib/fastcomments-client/models/add_hash_tag200_response.rb rename to client/lib/fastcomments-client/models/bulk_create_hash_tags_response_results_inner.rb index 01fdd4f..be91e63 100644 --- a/client/lib/fastcomments-client/models/add_hash_tag200_response.rb +++ b/client/lib/fastcomments-client/models/bulk_create_hash_tags_response_results_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - module AddHashTag200Response + module BulkCreateHashTagsResponseResultsInner class << self # List of class defined in anyOf (OpenAPI v3) def openapi_any_of @@ -37,7 +37,8 @@ def build(data) openapi_any_of.each do |klass| begin next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data rescue # rescue all errors so we keep iterating even if the current item lookup raises end end diff --git a/client/lib/fastcomments-client/models/bulk_pre_ban_params.rb b/client/lib/fastcomments-client/models/bulk_pre_ban_params.rb new file mode 100644 index 0000000..30b02ec --- /dev/null +++ b/client/lib/fastcomments-client/models/bulk_pre_ban_params.rb @@ -0,0 +1,239 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class BulkPreBanParams + attr_accessor :comment_ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'comment_ids' => :'commentIds' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'comment_ids' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::BulkPreBanParams` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::BulkPreBanParams`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'comment_ids') + if (value = attributes[:'comment_ids']).is_a?(Array) + self.comment_ids = value + end + else + self.comment_ids = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @comment_ids.nil? + invalid_properties.push('invalid value for "comment_ids", comment_ids cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @comment_ids.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] comment_ids Value to be assigned + def comment_ids=(comment_ids) + if comment_ids.nil? + fail ArgumentError, 'comment_ids cannot be nil' + end + + @comment_ids = comment_ids + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + comment_ids == o.comment_ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [comment_ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/bulk_pre_ban_summary.rb b/client/lib/fastcomments-client/models/bulk_pre_ban_summary.rb new file mode 100644 index 0000000..838b815 --- /dev/null +++ b/client/lib/fastcomments-client/models/bulk_pre_ban_summary.rb @@ -0,0 +1,375 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class BulkPreBanSummary + attr_accessor :status + + attr_accessor :total_related_comment_count + + attr_accessor :email_domains + + attr_accessor :emails + + attr_accessor :user_ids + + attr_accessor :ip_hashes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'total_related_comment_count' => :'totalRelatedCommentCount', + :'email_domains' => :'emailDomains', + :'emails' => :'emails', + :'user_ids' => :'userIds', + :'ip_hashes' => :'ipHashes' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'String', + :'total_related_comment_count' => :'Integer', + :'email_domains' => :'Array', + :'emails' => :'Array', + :'user_ids' => :'Array', + :'ip_hashes' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::BulkPreBanSummary` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::BulkPreBanSummary`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'total_related_comment_count') + self.total_related_comment_count = attributes[:'total_related_comment_count'] + else + self.total_related_comment_count = nil + end + + if attributes.key?(:'email_domains') + if (value = attributes[:'email_domains']).is_a?(Array) + self.email_domains = value + end + else + self.email_domains = nil + end + + if attributes.key?(:'emails') + if (value = attributes[:'emails']).is_a?(Array) + self.emails = value + end + else + self.emails = nil + end + + if attributes.key?(:'user_ids') + if (value = attributes[:'user_ids']).is_a?(Array) + self.user_ids = value + end + else + self.user_ids = nil + end + + if attributes.key?(:'ip_hashes') + if (value = attributes[:'ip_hashes']).is_a?(Array) + self.ip_hashes = value + end + else + self.ip_hashes = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @total_related_comment_count.nil? + invalid_properties.push('invalid value for "total_related_comment_count", total_related_comment_count cannot be nil.') + end + + if @email_domains.nil? + invalid_properties.push('invalid value for "email_domains", email_domains cannot be nil.') + end + + if @emails.nil? + invalid_properties.push('invalid value for "emails", emails cannot be nil.') + end + + if @user_ids.nil? + invalid_properties.push('invalid value for "user_ids", user_ids cannot be nil.') + end + + if @ip_hashes.nil? + invalid_properties.push('invalid value for "ip_hashes", ip_hashes cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + return false if @total_related_comment_count.nil? + return false if @email_domains.nil? + return false if @emails.nil? + return false if @user_ids.nil? + return false if @ip_hashes.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] total_related_comment_count Value to be assigned + def total_related_comment_count=(total_related_comment_count) + if total_related_comment_count.nil? + fail ArgumentError, 'total_related_comment_count cannot be nil' + end + + @total_related_comment_count = total_related_comment_count + end + + # Custom attribute writer method with validation + # @param [Object] email_domains Value to be assigned + def email_domains=(email_domains) + if email_domains.nil? + fail ArgumentError, 'email_domains cannot be nil' + end + + @email_domains = email_domains + end + + # Custom attribute writer method with validation + # @param [Object] emails Value to be assigned + def emails=(emails) + if emails.nil? + fail ArgumentError, 'emails cannot be nil' + end + + @emails = emails + end + + # Custom attribute writer method with validation + # @param [Object] user_ids Value to be assigned + def user_ids=(user_ids) + if user_ids.nil? + fail ArgumentError, 'user_ids cannot be nil' + end + + @user_ids = user_ids + end + + # Custom attribute writer method with validation + # @param [Object] ip_hashes Value to be assigned + def ip_hashes=(ip_hashes) + if ip_hashes.nil? + fail ArgumentError, 'ip_hashes cannot be nil' + end + + @ip_hashes = ip_hashes + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + total_related_comment_count == o.total_related_comment_count && + email_domains == o.email_domains && + emails == o.emails && + user_ids == o.user_ids && + ip_hashes == o.ip_hashes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, total_related_comment_count, email_domains, emails, user_ids, ip_hashes].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/change_comment_pin_status_response.rb b/client/lib/fastcomments-client/models/change_comment_pin_status_response.rb index eb8ece7..7aec64e 100644 --- a/client/lib/fastcomments-client/models/change_comment_pin_status_response.rb +++ b/client/lib/fastcomments-client/models/change_comment_pin_status_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class ChangeCommentPinStatusResponse < ApiModelBase + class ChangeCommentPinStatusResponse # Construct a type with a set of properties K of type T attr_accessor :comment_positions @@ -194,6 +194,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -210,6 +265,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/change_ticket_state_body.rb b/client/lib/fastcomments-client/models/change_ticket_state_body.rb index fef1d24..ed7b76a 100644 --- a/client/lib/fastcomments-client/models/change_ticket_state_body.rb +++ b/client/lib/fastcomments-client/models/change_ticket_state_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class ChangeTicketStateBody < ApiModelBase + class ChangeTicketStateBody attr_accessor :state # Attribute mapping from ruby-style variable name to JSON key. @@ -143,6 +143,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -159,6 +214,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/change_ticket_state_response.rb b/client/lib/fastcomments-client/models/change_ticket_state_response.rb index 46dde29..cabdf0b 100644 --- a/client/lib/fastcomments-client/models/change_ticket_state_response.rb +++ b/client/lib/fastcomments-client/models/change_ticket_state_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class ChangeTicketStateResponse < ApiModelBase + class ChangeTicketStateResponse attr_accessor :status attr_accessor :ticket @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/check_blocked_comments_response.rb b/client/lib/fastcomments-client/models/check_blocked_comments_response.rb index 5a3ad6f..8dc73fc 100644 --- a/client/lib/fastcomments-client/models/check_blocked_comments_response.rb +++ b/client/lib/fastcomments-client/models/check_blocked_comments_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CheckBlockedCommentsResponse < ApiModelBase + class CheckBlockedCommentsResponse # Construct a type with a set of properties K of type T attr_accessor :comment_statuses @@ -194,6 +194,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -210,6 +265,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/checked_comments_for_blocked200_response.rb b/client/lib/fastcomments-client/models/checked_comments_for_blocked200_response.rb deleted file mode 100644 index 573d8a9..0000000 --- a/client/lib/fastcomments-client/models/checked_comments_for_blocked200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module CheckedCommentsForBlocked200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'CheckBlockedCommentsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/combine_comments_with_question_results200_response.rb b/client/lib/fastcomments-client/models/combine_comments_with_question_results200_response.rb deleted file mode 100644 index afee7fb..0000000 --- a/client/lib/fastcomments-client/models/combine_comments_with_question_results200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module CombineCommentsWithQuestionResults200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'CombineQuestionResultsWithCommentsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/combine_question_results_with_comments_response.rb b/client/lib/fastcomments-client/models/combine_question_results_with_comments_response.rb index 679d0c3..4f9b729 100644 --- a/client/lib/fastcomments-client/models/combine_question_results_with_comments_response.rb +++ b/client/lib/fastcomments-client/models/combine_question_results_with_comments_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CombineQuestionResultsWithCommentsResponse < ApiModelBase + class CombineQuestionResultsWithCommentsResponse attr_accessor :status attr_accessor :data @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/comment_data.rb b/client/lib/fastcomments-client/models/comment_data.rb index a0ea915..a0b04b6 100644 --- a/client/lib/fastcomments-client/models/comment_data.rb +++ b/client/lib/fastcomments-client/models/comment_data.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CommentData < ApiModelBase + class CommentData attr_accessor :date attr_accessor :local_date_string @@ -66,6 +66,8 @@ class CommentData < ApiModelBase attr_accessor :tos + attr_accessor :bot_id + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -93,7 +95,8 @@ def self.attribute_map :'autoplay_delay_ms' => :'autoplayDelayMS', :'feedback_ids' => :'feedbackIds', :'question_values' => :'questionValues', - :'tos' => :'tos' + :'tos' => :'tos', + :'bot_id' => :'botId' } end @@ -133,8 +136,9 @@ def self.openapi_types :'from_offline_restore' => :'Boolean', :'autoplay_delay_ms' => :'Integer', :'feedback_ids' => :'Array', - :'question_values' => :'Hash', - :'tos' => :'Boolean' + :'question_values' => :'Hash', + :'tos' => :'Boolean', + :'bot_id' => :'String' } end @@ -282,6 +286,10 @@ def initialize(attributes = {}) if attributes.key?(:'tos') self.tos = attributes[:'tos'] end + + if attributes.key?(:'bot_id') + self.bot_id = attributes[:'bot_id'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -388,7 +396,8 @@ def ==(o) autoplay_delay_ms == o.autoplay_delay_ms && feedback_ids == o.feedback_ids && question_values == o.question_values && - tos == o.tos + tos == o.tos && + bot_id == o.bot_id end # @see the `==` method @@ -400,7 +409,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [date, local_date_string, local_date_hours, commenter_name, commenter_email, commenter_link, comment, product_id, user_id, avatar_src, parent_id, mentions, hash_tags, page_title, is_from_my_account_page, url, url_id, meta, moderation_group_ids, rating, from_offline_restore, autoplay_delay_ms, feedback_ids, question_values, tos].hash + [date, local_date_string, local_date_hours, commenter_name, commenter_email, commenter_link, comment, product_id, user_id, avatar_src, parent_id, mentions, hash_tags, page_title, is_from_my_account_page, url, url_id, meta, moderation_group_ids, rating, from_offline_restore, autoplay_delay_ms, feedback_ids, question_values, tos, bot_id].hash end # Builds the object from hash @@ -426,6 +435,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -442,6 +506,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/comment_html_rendering_mode.rb b/client/lib/fastcomments-client/models/comment_html_rendering_mode.rb index d311559..411fdd9 100644 --- a/client/lib/fastcomments-client/models/comment_html_rendering_mode.rb +++ b/client/lib/fastcomments-client/models/comment_html_rendering_mode.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/comment_log_data.rb b/client/lib/fastcomments-client/models/comment_log_data.rb index 60c413b..30c0506 100644 --- a/client/lib/fastcomments-client/models/comment_log_data.rb +++ b/client/lib/fastcomments-client/models/comment_log_data.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CommentLogData < ApiModelBase + class CommentLogData attr_accessor :clear_content attr_accessor :is_deleted_user @@ -45,6 +45,8 @@ class CommentLogData < ApiModelBase attr_accessor :trust_factor + attr_accessor :source + attr_accessor :rule attr_accessor :user_id @@ -147,6 +149,7 @@ def self.attribute_map :'engine_response' => :'engineResponse', :'engine_tokens' => :'engineTokens', :'trust_factor' => :'trustFactor', + :'source' => :'source', :'rule' => :'rule', :'user_id' => :'userId', :'subscribers' => :'subscribers', @@ -209,6 +212,7 @@ def self.openapi_types :'engine_response' => :'String', :'engine_tokens' => :'Float', :'trust_factor' => :'Float', + :'source' => :'String', :'rule' => :'SpamRule', :'user_id' => :'String', :'subscribers' => :'Float', @@ -335,6 +339,10 @@ def initialize(attributes = {}) self.trust_factor = attributes[:'trust_factor'] end + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + if attributes.key?(:'rule') self.rule = attributes[:'rule'] end @@ -507,6 +515,7 @@ def ==(o) engine_response == o.engine_response && engine_tokens == o.engine_tokens && trust_factor == o.trust_factor && + source == o.source && rule == o.rule && user_id == o.user_id && subscribers == o.subscribers && @@ -549,7 +558,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [clear_content, is_deleted_user, phrase, bad_word, word, locale, tenant_badge_id, badge_id, was_logged_in, found_user, verified, engine, engine_response, engine_tokens, trust_factor, rule, user_id, subscribers, notification_count, votes_before, votes_up_before, votes_down_before, votes_after, votes_up_after, votes_down_after, repeat_action, reason, other_data, spam_before, spam_after, permanent_flag, approved_before, approved_after, reviewed_before, reviewed_after, text_before, text_after, expire_before, expire_after, flag_count_before, trust_factor_before, trust_factor_after, referenced_comment_id, invalid_locale, detected_locale, detected_language].hash + [clear_content, is_deleted_user, phrase, bad_word, word, locale, tenant_badge_id, badge_id, was_logged_in, found_user, verified, engine, engine_response, engine_tokens, trust_factor, source, rule, user_id, subscribers, notification_count, votes_before, votes_up_before, votes_down_before, votes_after, votes_up_after, votes_down_after, repeat_action, reason, other_data, spam_before, spam_after, permanent_flag, approved_before, approved_after, reviewed_before, reviewed_after, text_before, text_after, expire_before, expire_after, flag_count_before, trust_factor_before, trust_factor_after, referenced_comment_id, invalid_locale, detected_locale, detected_language].hash end # Builds the object from hash @@ -575,6 +584,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -591,6 +655,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/comment_log_entry.rb b/client/lib/fastcomments-client/models/comment_log_entry.rb index d3e1a9c..931e9f1 100644 --- a/client/lib/fastcomments-client/models/comment_log_entry.rb +++ b/client/lib/fastcomments-client/models/comment_log_entry.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CommentLogEntry < ApiModelBase + class CommentLogEntry attr_accessor :d attr_accessor :t @@ -200,6 +200,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -216,6 +271,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/comment_log_type.rb b/client/lib/fastcomments-client/models/comment_log_type.rb index ee869b2..3b4ce98 100644 --- a/client/lib/fastcomments-client/models/comment_log_type.rb +++ b/client/lib/fastcomments-client/models/comment_log_type.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/comment_question_results_rendering_type.rb b/client/lib/fastcomments-client/models/comment_question_results_rendering_type.rb index 3fb323a..e309851 100644 --- a/client/lib/fastcomments-client/models/comment_question_results_rendering_type.rb +++ b/client/lib/fastcomments-client/models/comment_question_results_rendering_type.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/comment_questions_required.rb b/client/lib/fastcomments-client/models/comment_questions_required.rb index f856a28..df4e891 100644 --- a/client/lib/fastcomments-client/models/comment_questions_required.rb +++ b/client/lib/fastcomments-client/models/comment_questions_required.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/comment_text_update_request.rb b/client/lib/fastcomments-client/models/comment_text_update_request.rb index c4bd656..ce56e5d 100644 --- a/client/lib/fastcomments-client/models/comment_text_update_request.rb +++ b/client/lib/fastcomments-client/models/comment_text_update_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CommentTextUpdateRequest < ApiModelBase + class CommentTextUpdateRequest attr_accessor :comment attr_accessor :mentions @@ -165,6 +165,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -181,6 +236,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/comment_thread_deletion_mode.rb b/client/lib/fastcomments-client/models/comment_thread_deletion_mode.rb index af279b6..61b3d63 100644 --- a/client/lib/fastcomments-client/models/comment_thread_deletion_mode.rb +++ b/client/lib/fastcomments-client/models/comment_thread_deletion_mode.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/comment_user_badge_info.rb b/client/lib/fastcomments-client/models/comment_user_badge_info.rb index b4fd2e1..16a8f15 100644 --- a/client/lib/fastcomments-client/models/comment_user_badge_info.rb +++ b/client/lib/fastcomments-client/models/comment_user_badge_info.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CommentUserBadgeInfo < ApiModelBase + class CommentUserBadgeInfo attr_accessor :id attr_accessor :type @@ -255,6 +255,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -271,6 +326,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/comment_user_hash_tag_info.rb b/client/lib/fastcomments-client/models/comment_user_hash_tag_info.rb index f94fbb6..b8ad908 100644 --- a/client/lib/fastcomments-client/models/comment_user_hash_tag_info.rb +++ b/client/lib/fastcomments-client/models/comment_user_hash_tag_info.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CommentUserHashTagInfo < ApiModelBase + class CommentUserHashTagInfo attr_accessor :id attr_accessor :tag @@ -190,6 +190,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -206,6 +261,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/comment_user_mention_info.rb b/client/lib/fastcomments-client/models/comment_user_mention_info.rb index 6a17017..52ae622 100644 --- a/client/lib/fastcomments-client/models/comment_user_mention_info.rb +++ b/client/lib/fastcomments-client/models/comment_user_mention_info.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CommentUserMentionInfo < ApiModelBase + class CommentUserMentionInfo attr_accessor :id attr_accessor :tag @@ -230,6 +230,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -246,6 +301,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/commenter_name_formats.rb b/client/lib/fastcomments-client/models/commenter_name_formats.rb index a3ce4d6..3b893fe 100644 --- a/client/lib/fastcomments-client/models/commenter_name_formats.rb +++ b/client/lib/fastcomments-client/models/commenter_name_formats.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/comments_by_ids_params.rb b/client/lib/fastcomments-client/models/comments_by_ids_params.rb new file mode 100644 index 0000000..1be71dc --- /dev/null +++ b/client/lib/fastcomments-client/models/comments_by_ids_params.rb @@ -0,0 +1,239 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class CommentsByIdsParams + attr_accessor :ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ids' => :'ids' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ids' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::CommentsByIdsParams` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::CommentsByIdsParams`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ids') + if (value = attributes[:'ids']).is_a?(Array) + self.ids = value + end + else + self.ids = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @ids.nil? + invalid_properties.push('invalid value for "ids", ids cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @ids.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] ids Value to be assigned + def ids=(ids) + if ids.nil? + fail ArgumentError, 'ids cannot be nil' + end + + @ids = ids + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ids == o.ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/create_api_page_data.rb b/client/lib/fastcomments-client/models/create_api_page_data.rb index c2055cc..a8d81af 100644 --- a/client/lib/fastcomments-client/models/create_api_page_data.rb +++ b/client/lib/fastcomments-client/models/create_api_page_data.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateAPIPageData < ApiModelBase + class CreateAPIPageData attr_accessor :accessible_by_group_ids attr_accessor :root_comment_count @@ -224,6 +224,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -240,6 +295,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_api_user_subscription_data.rb b/client/lib/fastcomments-client/models/create_api_user_subscription_data.rb index a628f4c..286569b 100644 --- a/client/lib/fastcomments-client/models/create_api_user_subscription_data.rb +++ b/client/lib/fastcomments-client/models/create_api_user_subscription_data.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateAPIUserSubscriptionData < ApiModelBase + class CreateAPIUserSubscriptionData attr_accessor :notification_frequency attr_accessor :page_title @@ -188,6 +188,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -204,6 +259,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_apisso_user_data.rb b/client/lib/fastcomments-client/models/create_apisso_user_data.rb index 23178be..515720b 100644 --- a/client/lib/fastcomments-client/models/create_apisso_user_data.rb +++ b/client/lib/fastcomments-client/models/create_apisso_user_data.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateAPISSOUserData < ApiModelBase + class CreateAPISSOUserData attr_accessor :group_ids attr_accessor :has_blocked_users @@ -350,6 +350,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -366,6 +421,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_comment_params.rb b/client/lib/fastcomments-client/models/create_comment_params.rb index ccb7313..b358b2d 100644 --- a/client/lib/fastcomments-client/models/create_comment_params.rb +++ b/client/lib/fastcomments-client/models/create_comment_params.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateCommentParams < ApiModelBase + class CreateCommentParams attr_accessor :date attr_accessor :local_date_string @@ -66,6 +66,8 @@ class CreateCommentParams < ApiModelBase attr_accessor :tos + attr_accessor :bot_id + attr_accessor :approved attr_accessor :domain @@ -115,6 +117,7 @@ def self.attribute_map :'feedback_ids' => :'feedbackIds', :'question_values' => :'questionValues', :'tos' => :'tos', + :'bot_id' => :'botId', :'approved' => :'approved', :'domain' => :'domain', :'ip' => :'ip', @@ -164,8 +167,9 @@ def self.openapi_types :'from_offline_restore' => :'Boolean', :'autoplay_delay_ms' => :'Integer', :'feedback_ids' => :'Array', - :'question_values' => :'Hash', + :'question_values' => :'Hash', :'tos' => :'Boolean', + :'bot_id' => :'String', :'approved' => :'Boolean', :'domain' => :'String', :'ip' => :'String', @@ -324,6 +328,10 @@ def initialize(attributes = {}) self.tos = attributes[:'tos'] end + if attributes.key?(:'bot_id') + self.bot_id = attributes[:'bot_id'] + end + if attributes.key?(:'approved') self.approved = attributes[:'approved'] end @@ -487,6 +495,7 @@ def ==(o) feedback_ids == o.feedback_ids && question_values == o.question_values && tos == o.tos && + bot_id == o.bot_id && approved == o.approved && domain == o.domain && ip == o.ip && @@ -508,7 +517,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [date, local_date_string, local_date_hours, commenter_name, commenter_email, commenter_link, comment, product_id, user_id, avatar_src, parent_id, mentions, hash_tags, page_title, is_from_my_account_page, url, url_id, meta, moderation_group_ids, rating, from_offline_restore, autoplay_delay_ms, feedback_ids, question_values, tos, approved, domain, ip, is_pinned, locale, reviewed, verified, votes, votes_down, votes_up].hash + [date, local_date_string, local_date_hours, commenter_name, commenter_email, commenter_link, comment, product_id, user_id, avatar_src, parent_id, mentions, hash_tags, page_title, is_from_my_account_page, url, url_id, meta, moderation_group_ids, rating, from_offline_restore, autoplay_delay_ms, feedback_ids, question_values, tos, bot_id, approved, domain, ip, is_pinned, locale, reviewed, verified, votes, votes_down, votes_up].hash end # Builds the object from hash @@ -534,6 +543,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -550,6 +614,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_comment_public200_response.rb b/client/lib/fastcomments-client/models/create_comment_public200_response.rb deleted file mode 100644 index a1eee2a..0000000 --- a/client/lib/fastcomments-client/models/create_comment_public200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module CreateCommentPublic200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'SaveCommentsResponseWithPresence' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/create_email_template200_response.rb b/client/lib/fastcomments-client/models/create_email_template200_response.rb deleted file mode 100644 index d1ea3a9..0000000 --- a/client/lib/fastcomments-client/models/create_email_template200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module CreateEmailTemplate200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'CreateEmailTemplateResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/create_email_template_body.rb b/client/lib/fastcomments-client/models/create_email_template_body.rb index 7a2ab34..0bdc503 100644 --- a/client/lib/fastcomments-client/models/create_email_template_body.rb +++ b/client/lib/fastcomments-client/models/create_email_template_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateEmailTemplateBody < ApiModelBase + class CreateEmailTemplateBody attr_accessor :email_template_id attr_accessor :display_name @@ -228,6 +228,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -244,6 +299,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_email_template_response.rb b/client/lib/fastcomments-client/models/create_email_template_response.rb index 2ec1f80..1739a49 100644 --- a/client/lib/fastcomments-client/models/create_email_template_response.rb +++ b/client/lib/fastcomments-client/models/create_email_template_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateEmailTemplateResponse < ApiModelBase + class CreateEmailTemplateResponse attr_accessor :status attr_accessor :email_template @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_feed_post200_response.rb b/client/lib/fastcomments-client/models/create_feed_post200_response.rb deleted file mode 100644 index df9f60a..0000000 --- a/client/lib/fastcomments-client/models/create_feed_post200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module CreateFeedPost200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'CreateFeedPostsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/create_feed_post_params.rb b/client/lib/fastcomments-client/models/create_feed_post_params.rb index e07c04f..e2505d8 100644 --- a/client/lib/fastcomments-client/models/create_feed_post_params.rb +++ b/client/lib/fastcomments-client/models/create_feed_post_params.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateFeedPostParams < ApiModelBase + class CreateFeedPostParams attr_accessor :title attr_accessor :content_html @@ -198,6 +198,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -214,6 +269,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_feed_post_public200_response.rb b/client/lib/fastcomments-client/models/create_feed_post_public200_response.rb deleted file mode 100644 index 8475e59..0000000 --- a/client/lib/fastcomments-client/models/create_feed_post_public200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module CreateFeedPostPublic200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'CreateFeedPostResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/create_feed_post_response.rb b/client/lib/fastcomments-client/models/create_feed_post_response.rb index f0f70d4..f32da97 100644 --- a/client/lib/fastcomments-client/models/create_feed_post_response.rb +++ b/client/lib/fastcomments-client/models/create_feed_post_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateFeedPostResponse < ApiModelBase + class CreateFeedPostResponse attr_accessor :status attr_accessor :feed_post @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_feed_posts_response.rb b/client/lib/fastcomments-client/models/create_feed_posts_response.rb index 7157dc4..a80f0ab 100644 --- a/client/lib/fastcomments-client/models/create_feed_posts_response.rb +++ b/client/lib/fastcomments-client/models/create_feed_posts_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateFeedPostsResponse < ApiModelBase + class CreateFeedPostsResponse attr_accessor :status attr_accessor :feed_post @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_hash_tag_body.rb b/client/lib/fastcomments-client/models/create_hash_tag_body.rb index 4b221b7..133cac7 100644 --- a/client/lib/fastcomments-client/models/create_hash_tag_body.rb +++ b/client/lib/fastcomments-client/models/create_hash_tag_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateHashTagBody < ApiModelBase + class CreateHashTagBody attr_accessor :tenant_id attr_accessor :tag @@ -161,6 +161,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -177,6 +232,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_hash_tag_response.rb b/client/lib/fastcomments-client/models/create_hash_tag_response.rb index 4a73504..f29e56b 100644 --- a/client/lib/fastcomments-client/models/create_hash_tag_response.rb +++ b/client/lib/fastcomments-client/models/create_hash_tag_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateHashTagResponse < ApiModelBase + class CreateHashTagResponse attr_accessor :status attr_accessor :hash_tag @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_moderator200_response.rb b/client/lib/fastcomments-client/models/create_moderator200_response.rb deleted file mode 100644 index f4119f3..0000000 --- a/client/lib/fastcomments-client/models/create_moderator200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module CreateModerator200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'CreateModeratorResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/create_moderator_body.rb b/client/lib/fastcomments-client/models/create_moderator_body.rb index c99ca28..24727d8 100644 --- a/client/lib/fastcomments-client/models/create_moderator_body.rb +++ b/client/lib/fastcomments-client/models/create_moderator_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateModeratorBody < ApiModelBase + class CreateModeratorBody attr_accessor :name attr_accessor :email @@ -189,6 +189,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -205,6 +260,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_moderator_response.rb b/client/lib/fastcomments-client/models/create_moderator_response.rb index 6ec73d3..39a7df2 100644 --- a/client/lib/fastcomments-client/models/create_moderator_response.rb +++ b/client/lib/fastcomments-client/models/create_moderator_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateModeratorResponse < ApiModelBase + class CreateModeratorResponse attr_accessor :status attr_accessor :moderator @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_question_config200_response.rb b/client/lib/fastcomments-client/models/create_question_config200_response.rb deleted file mode 100644 index 0ca7332..0000000 --- a/client/lib/fastcomments-client/models/create_question_config200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module CreateQuestionConfig200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'CreateQuestionConfigResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/create_question_config_body.rb b/client/lib/fastcomments-client/models/create_question_config_body.rb index aa101c2..c9d6301 100644 --- a/client/lib/fastcomments-client/models/create_question_config_body.rb +++ b/client/lib/fastcomments-client/models/create_question_config_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateQuestionConfigBody < ApiModelBase + class CreateQuestionConfigBody attr_accessor :name attr_accessor :question @@ -315,6 +315,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -331,6 +386,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_question_config_response.rb b/client/lib/fastcomments-client/models/create_question_config_response.rb index 27a7e53..6ccb4af 100644 --- a/client/lib/fastcomments-client/models/create_question_config_response.rb +++ b/client/lib/fastcomments-client/models/create_question_config_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateQuestionConfigResponse < ApiModelBase + class CreateQuestionConfigResponse attr_accessor :status attr_accessor :question_config @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_question_result200_response.rb b/client/lib/fastcomments-client/models/create_question_result200_response.rb deleted file mode 100644 index 01068ef..0000000 --- a/client/lib/fastcomments-client/models/create_question_result200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module CreateQuestionResult200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'CreateQuestionResultResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/create_question_result_body.rb b/client/lib/fastcomments-client/models/create_question_result_body.rb index 094e67d..d8e349b 100644 --- a/client/lib/fastcomments-client/models/create_question_result_body.rb +++ b/client/lib/fastcomments-client/models/create_question_result_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateQuestionResultBody < ApiModelBase + class CreateQuestionResultBody attr_accessor :url_id attr_accessor :value @@ -234,6 +234,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -250,6 +305,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_question_result_response.rb b/client/lib/fastcomments-client/models/create_question_result_response.rb index 19bfb40..e87fd3e 100644 --- a/client/lib/fastcomments-client/models/create_question_result_response.rb +++ b/client/lib/fastcomments-client/models/create_question_result_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateQuestionResultResponse < ApiModelBase + class CreateQuestionResultResponse attr_accessor :status attr_accessor :question_result @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_subscription_api_response.rb b/client/lib/fastcomments-client/models/create_subscription_api_response.rb index 486bbf8..79f2bd5 100644 --- a/client/lib/fastcomments-client/models/create_subscription_api_response.rb +++ b/client/lib/fastcomments-client/models/create_subscription_api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateSubscriptionAPIResponse < ApiModelBase + class CreateSubscriptionAPIResponse attr_accessor :reason attr_accessor :code @@ -170,6 +170,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -186,6 +241,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_tenant200_response.rb b/client/lib/fastcomments-client/models/create_tenant200_response.rb deleted file mode 100644 index 4e34d97..0000000 --- a/client/lib/fastcomments-client/models/create_tenant200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module CreateTenant200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'CreateTenantResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/create_tenant_body.rb b/client/lib/fastcomments-client/models/create_tenant_body.rb index c7e27a2..1cfb80b 100644 --- a/client/lib/fastcomments-client/models/create_tenant_body.rb +++ b/client/lib/fastcomments-client/models/create_tenant_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateTenantBody < ApiModelBase + class CreateTenantBody attr_accessor :name attr_accessor :domain_configuration @@ -363,6 +363,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -379,6 +434,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_tenant_package200_response.rb b/client/lib/fastcomments-client/models/create_tenant_package200_response.rb deleted file mode 100644 index 5804067..0000000 --- a/client/lib/fastcomments-client/models/create_tenant_package200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module CreateTenantPackage200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'CreateTenantPackageResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/create_tenant_package_body.rb b/client/lib/fastcomments-client/models/create_tenant_package_body.rb index 400a6df..b4a18b8 100644 --- a/client/lib/fastcomments-client/models/create_tenant_package_body.rb +++ b/client/lib/fastcomments-client/models/create_tenant_package_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateTenantPackageBody < ApiModelBase + class CreateTenantPackageBody attr_accessor :name attr_accessor :monthly_cost_usd @@ -97,9 +97,9 @@ class CreateTenantPackageBody < ApiModelBase attr_accessor :flex_domain_unit - attr_accessor :flex_chat_gpt_cost_cents + attr_accessor :flex_llm_cost_cents - attr_accessor :flex_chat_gpt_unit + attr_accessor :flex_llm_unit attr_accessor :flex_minimum_cost_cents @@ -157,8 +157,8 @@ def self.attribute_map :'flex_admin_unit' => :'flexAdminUnit', :'flex_domain_cost_cents' => :'flexDomainCostCents', :'flex_domain_unit' => :'flexDomainUnit', - :'flex_chat_gpt_cost_cents' => :'flexChatGPTCostCents', - :'flex_chat_gpt_unit' => :'flexChatGPTUnit', + :'flex_llm_cost_cents' => :'flexLLMCostCents', + :'flex_llm_unit' => :'flexLLMUnit', :'flex_minimum_cost_cents' => :'flexMinimumCostCents', :'flex_managed_tenant_cost_cents' => :'flexManagedTenantCostCents', :'flex_sso_admin_cost_cents' => :'flexSSOAdminCostCents', @@ -222,8 +222,8 @@ def self.openapi_types :'flex_admin_unit' => :'Float', :'flex_domain_cost_cents' => :'Float', :'flex_domain_unit' => :'Float', - :'flex_chat_gpt_cost_cents' => :'Float', - :'flex_chat_gpt_unit' => :'Float', + :'flex_llm_cost_cents' => :'Float', + :'flex_llm_unit' => :'Float', :'flex_minimum_cost_cents' => :'Float', :'flex_managed_tenant_cost_cents' => :'Float', :'flex_sso_admin_cost_cents' => :'Float', @@ -451,12 +451,12 @@ def initialize(attributes = {}) self.flex_domain_unit = attributes[:'flex_domain_unit'] end - if attributes.key?(:'flex_chat_gpt_cost_cents') - self.flex_chat_gpt_cost_cents = attributes[:'flex_chat_gpt_cost_cents'] + if attributes.key?(:'flex_llm_cost_cents') + self.flex_llm_cost_cents = attributes[:'flex_llm_cost_cents'] end - if attributes.key?(:'flex_chat_gpt_unit') - self.flex_chat_gpt_unit = attributes[:'flex_chat_gpt_unit'] + if attributes.key?(:'flex_llm_unit') + self.flex_llm_unit = attributes[:'flex_llm_unit'] end if attributes.key?(:'flex_minimum_cost_cents') @@ -740,8 +740,8 @@ def ==(o) flex_admin_unit == o.flex_admin_unit && flex_domain_cost_cents == o.flex_domain_cost_cents && flex_domain_unit == o.flex_domain_unit && - flex_chat_gpt_cost_cents == o.flex_chat_gpt_cost_cents && - flex_chat_gpt_unit == o.flex_chat_gpt_unit && + flex_llm_cost_cents == o.flex_llm_cost_cents && + flex_llm_unit == o.flex_llm_unit && flex_minimum_cost_cents == o.flex_minimum_cost_cents && flex_managed_tenant_cost_cents == o.flex_managed_tenant_cost_cents && flex_sso_admin_cost_cents == o.flex_sso_admin_cost_cents && @@ -759,7 +759,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, monthly_cost_usd, yearly_cost_usd, monthly_stripe_plan_id, yearly_stripe_plan_id, max_monthly_page_loads, max_monthly_api_credits, max_monthly_small_widgets_credits, max_monthly_comments, max_concurrent_users, max_tenant_users, max_sso_users, max_moderators, max_domains, max_white_labeled_tenants, max_monthly_event_log_requests, max_custom_collection_size, has_white_labeling, has_debranding, has_llm_spam_detection, for_who_text, feature_taglines, has_auditing, has_flex_pricing, enable_saml, flex_page_load_cost_cents, flex_page_load_unit, flex_comment_cost_cents, flex_comment_unit, flex_sso_user_cost_cents, flex_sso_user_unit, flex_api_credit_cost_cents, flex_api_credit_unit, flex_small_widgets_credit_cost_cents, flex_small_widgets_credit_unit, flex_moderator_cost_cents, flex_moderator_unit, flex_admin_cost_cents, flex_admin_unit, flex_domain_cost_cents, flex_domain_unit, flex_chat_gpt_cost_cents, flex_chat_gpt_unit, flex_minimum_cost_cents, flex_managed_tenant_cost_cents, flex_sso_admin_cost_cents, flex_sso_admin_unit, flex_sso_moderator_cost_cents, flex_sso_moderator_unit].hash + [name, monthly_cost_usd, yearly_cost_usd, monthly_stripe_plan_id, yearly_stripe_plan_id, max_monthly_page_loads, max_monthly_api_credits, max_monthly_small_widgets_credits, max_monthly_comments, max_concurrent_users, max_tenant_users, max_sso_users, max_moderators, max_domains, max_white_labeled_tenants, max_monthly_event_log_requests, max_custom_collection_size, has_white_labeling, has_debranding, has_llm_spam_detection, for_who_text, feature_taglines, has_auditing, has_flex_pricing, enable_saml, flex_page_load_cost_cents, flex_page_load_unit, flex_comment_cost_cents, flex_comment_unit, flex_sso_user_cost_cents, flex_sso_user_unit, flex_api_credit_cost_cents, flex_api_credit_unit, flex_small_widgets_credit_cost_cents, flex_small_widgets_credit_unit, flex_moderator_cost_cents, flex_moderator_unit, flex_admin_cost_cents, flex_admin_unit, flex_domain_cost_cents, flex_domain_unit, flex_llm_cost_cents, flex_llm_unit, flex_minimum_cost_cents, flex_managed_tenant_cost_cents, flex_sso_admin_cost_cents, flex_sso_admin_unit, flex_sso_moderator_cost_cents, flex_sso_moderator_unit].hash end # Builds the object from hash @@ -785,6 +785,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -801,6 +856,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_tenant_package_response.rb b/client/lib/fastcomments-client/models/create_tenant_package_response.rb index b3d94e1..08c99da 100644 --- a/client/lib/fastcomments-client/models/create_tenant_package_response.rb +++ b/client/lib/fastcomments-client/models/create_tenant_package_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateTenantPackageResponse < ApiModelBase + class CreateTenantPackageResponse attr_accessor :status attr_accessor :tenant_package @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_tenant_response.rb b/client/lib/fastcomments-client/models/create_tenant_response.rb index 1288783..0647ab5 100644 --- a/client/lib/fastcomments-client/models/create_tenant_response.rb +++ b/client/lib/fastcomments-client/models/create_tenant_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateTenantResponse < ApiModelBase + class CreateTenantResponse attr_accessor :status attr_accessor :tenant @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_tenant_user200_response.rb b/client/lib/fastcomments-client/models/create_tenant_user200_response.rb deleted file mode 100644 index 1eee0fb..0000000 --- a/client/lib/fastcomments-client/models/create_tenant_user200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module CreateTenantUser200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'CreateTenantUserResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/create_tenant_user_body.rb b/client/lib/fastcomments-client/models/create_tenant_user_body.rb index 4e937e0..3579103 100644 --- a/client/lib/fastcomments-client/models/create_tenant_user_body.rb +++ b/client/lib/fastcomments-client/models/create_tenant_user_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateTenantUserBody < ApiModelBase + class CreateTenantUserBody attr_accessor :username attr_accessor :email @@ -369,6 +369,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -385,6 +440,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_tenant_user_response.rb b/client/lib/fastcomments-client/models/create_tenant_user_response.rb index f8f952c..f27f791 100644 --- a/client/lib/fastcomments-client/models/create_tenant_user_response.rb +++ b/client/lib/fastcomments-client/models/create_tenant_user_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateTenantUserResponse < ApiModelBase + class CreateTenantUserResponse attr_accessor :status attr_accessor :tenant_user @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_ticket200_response.rb b/client/lib/fastcomments-client/models/create_ticket200_response.rb deleted file mode 100644 index b285d8c..0000000 --- a/client/lib/fastcomments-client/models/create_ticket200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module CreateTicket200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'CreateTicketResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/create_ticket_body.rb b/client/lib/fastcomments-client/models/create_ticket_body.rb index 5e6339a..e35a0d1 100644 --- a/client/lib/fastcomments-client/models/create_ticket_body.rb +++ b/client/lib/fastcomments-client/models/create_ticket_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateTicketBody < ApiModelBase + class CreateTicketBody attr_accessor :subject # Attribute mapping from ruby-style variable name to JSON key. @@ -143,6 +143,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -159,6 +214,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_ticket_response.rb b/client/lib/fastcomments-client/models/create_ticket_response.rb index 5e76ec1..2122527 100644 --- a/client/lib/fastcomments-client/models/create_ticket_response.rb +++ b/client/lib/fastcomments-client/models/create_ticket_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateTicketResponse < ApiModelBase + class CreateTicketResponse attr_accessor :status attr_accessor :ticket @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_user_badge200_response.rb b/client/lib/fastcomments-client/models/create_user_badge200_response.rb deleted file mode 100644 index f1a6363..0000000 --- a/client/lib/fastcomments-client/models/create_user_badge200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module CreateUserBadge200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APICreateUserBadgeResponse', - :'APIError' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/create_user_badge_params.rb b/client/lib/fastcomments-client/models/create_user_badge_params.rb index 2197b09..94c2c98 100644 --- a/client/lib/fastcomments-client/models/create_user_badge_params.rb +++ b/client/lib/fastcomments-client/models/create_user_badge_params.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CreateUserBadgeParams < ApiModelBase + class CreateUserBadgeParams attr_accessor :user_id attr_accessor :badge_id @@ -178,6 +178,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -194,6 +249,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/create_v1_page_react.rb b/client/lib/fastcomments-client/models/create_v1_page_react.rb new file mode 100644 index 0000000..ad2823f --- /dev/null +++ b/client/lib/fastcomments-client/models/create_v1_page_react.rb @@ -0,0 +1,268 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class CreateV1PageReact + attr_accessor :code + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'String', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::CreateV1PageReact` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::CreateV1PageReact`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/custom_config_parameters.rb b/client/lib/fastcomments-client/models/custom_config_parameters.rb index be379d1..d9395d4 100644 --- a/client/lib/fastcomments-client/models/custom_config_parameters.rb +++ b/client/lib/fastcomments-client/models/custom_config_parameters.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CustomConfigParameters < ApiModelBase + class CustomConfigParameters attr_accessor :absolute_and_relative_dates attr_accessor :absolute_dates @@ -119,6 +119,10 @@ class CustomConfigParameters < ApiModelBase attr_accessor :no_image_uploads + attr_accessor :allow_embeds + + attr_accessor :allowed_embed_domains + attr_accessor :no_styles attr_accessor :page_size @@ -129,6 +133,8 @@ class CustomConfigParameters < ApiModelBase attr_accessor :require_sso + attr_accessor :enable_f_chat + attr_accessor :enable_resize_handle attr_accessor :restricted_link_domains @@ -170,6 +176,10 @@ class CustomConfigParameters < ApiModelBase attr_accessor :wrap + attr_accessor :users_list_location + + attr_accessor :users_list_include_offline + attr_accessor :ticket_base_url attr_accessor :ticket_kb_search_endpoint @@ -259,11 +269,14 @@ def self.attribute_map :'no_custom_config' => :'noCustomConfig', :'mention_auto_complete_mode' => :'mentionAutoCompleteMode', :'no_image_uploads' => :'noImageUploads', + :'allow_embeds' => :'allowEmbeds', + :'allowed_embed_domains' => :'allowedEmbedDomains', :'no_styles' => :'noStyles', :'page_size' => :'pageSize', :'readonly' => :'readonly', :'no_new_root_comments' => :'noNewRootComments', :'require_sso' => :'requireSSO', + :'enable_f_chat' => :'enableFChat', :'enable_resize_handle' => :'enableResizeHandle', :'restricted_link_domains' => :'restrictedLinkDomains', :'show_badges_in_top_bar' => :'showBadgesInTopBar', @@ -284,6 +297,8 @@ def self.attribute_map :'widget_questions_required' => :'widgetQuestionsRequired', :'widget_sub_question_visibility' => :'widgetSubQuestionVisibility', :'wrap' => :'wrap', + :'users_list_location' => :'usersListLocation', + :'users_list_include_offline' => :'usersListIncludeOffline', :'ticket_base_url' => :'ticketBaseUrl', :'ticket_kb_search_endpoint' => :'ticketKBSearchEndpoint', :'ticket_file_uploads_enabled' => :'ticketFileUploadsEnabled', @@ -358,11 +373,14 @@ def self.openapi_types :'no_custom_config' => :'Boolean', :'mention_auto_complete_mode' => :'MentionAutoCompleteMode', :'no_image_uploads' => :'Boolean', + :'allow_embeds' => :'Boolean', + :'allowed_embed_domains' => :'Array', :'no_styles' => :'Boolean', :'page_size' => :'Integer', :'readonly' => :'Boolean', :'no_new_root_comments' => :'Boolean', :'require_sso' => :'Boolean', + :'enable_f_chat' => :'Boolean', :'enable_resize_handle' => :'Boolean', :'restricted_link_domains' => :'Array', :'show_badges_in_top_bar' => :'Boolean', @@ -383,6 +401,8 @@ def self.openapi_types :'widget_questions_required' => :'CommentQuestionsRequired', :'widget_sub_question_visibility' => :'QuestionSubQuestionVisibility', :'wrap' => :'Boolean', + :'users_list_location' => :'UsersListLocation', + :'users_list_include_offline' => :'Boolean', :'ticket_base_url' => :'String', :'ticket_kb_search_endpoint' => :'String', :'ticket_file_uploads_enabled' => :'Boolean', @@ -409,6 +429,7 @@ def self.openapi_nullable :'max_comment_character_length', :'max_comment_created_count_pupm', :'mention_auto_complete_mode', + :'allowed_embed_domains', :'page_size', :'restricted_link_domains', :'translations', @@ -641,6 +662,16 @@ def initialize(attributes = {}) self.no_image_uploads = attributes[:'no_image_uploads'] end + if attributes.key?(:'allow_embeds') + self.allow_embeds = attributes[:'allow_embeds'] + end + + if attributes.key?(:'allowed_embed_domains') + if (value = attributes[:'allowed_embed_domains']).is_a?(Array) + self.allowed_embed_domains = value + end + end + if attributes.key?(:'no_styles') self.no_styles = attributes[:'no_styles'] end @@ -661,6 +692,10 @@ def initialize(attributes = {}) self.require_sso = attributes[:'require_sso'] end + if attributes.key?(:'enable_f_chat') + self.enable_f_chat = attributes[:'enable_f_chat'] + end + if attributes.key?(:'enable_resize_handle') self.enable_resize_handle = attributes[:'enable_resize_handle'] end @@ -747,6 +782,14 @@ def initialize(attributes = {}) self.wrap = attributes[:'wrap'] end + if attributes.key?(:'users_list_location') + self.users_list_location = attributes[:'users_list_location'] + end + + if attributes.key?(:'users_list_include_offline') + self.users_list_include_offline = attributes[:'users_list_include_offline'] + end + if attributes.key?(:'ticket_base_url') self.ticket_base_url = attributes[:'ticket_base_url'] end @@ -846,11 +889,14 @@ def ==(o) no_custom_config == o.no_custom_config && mention_auto_complete_mode == o.mention_auto_complete_mode && no_image_uploads == o.no_image_uploads && + allow_embeds == o.allow_embeds && + allowed_embed_domains == o.allowed_embed_domains && no_styles == o.no_styles && page_size == o.page_size && readonly == o.readonly && no_new_root_comments == o.no_new_root_comments && require_sso == o.require_sso && + enable_f_chat == o.enable_f_chat && enable_resize_handle == o.enable_resize_handle && restricted_link_domains == o.restricted_link_domains && show_badges_in_top_bar == o.show_badges_in_top_bar && @@ -871,6 +917,8 @@ def ==(o) widget_questions_required == o.widget_questions_required && widget_sub_question_visibility == o.widget_sub_question_visibility && wrap == o.wrap && + users_list_location == o.users_list_location && + users_list_include_offline == o.users_list_include_offline && ticket_base_url == o.ticket_base_url && ticket_kb_search_endpoint == o.ticket_kb_search_endpoint && ticket_file_uploads_enabled == o.ticket_file_uploads_enabled && @@ -888,7 +936,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [absolute_and_relative_dates, absolute_dates, allow_anon, allow_anon_flag, allow_anon_votes, allowed_languages, collapse_replies, comment_count_format, comment_html_rendering_mode, comment_thread_delete_mode, commenter_name_format, count_above_toggle, custom_css, default_avatar_src, default_sort_direction, default_username, disable_auto_admin_migration, disable_auto_hash_tag_creation, disable_blocking, disable_commenter_comment_delete, disable_commenter_comment_edit, disable_email_inputs, disable_live_commenting, disable_notification_bell, disable_profile_comments, disable_profile_direct_messages, disable_profiles, disable_success_message, disable_toolbar, disable_unverified_label, disable_voting, enable_commenter_links, enable_search, enable_spoilers, enable_third_party_cookie_bypass, enable_view_counts, enable_vote_list, enable_wysiwyg, gif_rating, has_dark_background, header_html, hide_avatars, hide_comments_under_count_text_format, image_content_profanity_level, input_after_comments, limit_comments_by_groups, locale, max_comment_character_length, max_comment_created_count_pupm, no_custom_config, mention_auto_complete_mode, no_image_uploads, no_styles, page_size, readonly, no_new_root_comments, require_sso, enable_resize_handle, restricted_link_domains, show_badges_in_top_bar, show_comment_save_success, show_live_right_away, show_question, spam_rules, sso_sec_lvl, translations, use_show_comments_toggle, use_single_line_comment_input, vote_style, widget_question_id, widget_question_results_style, widget_question_show_breakdown, widget_question_style, widget_question_when_to_save, widget_questions_required, widget_sub_question_visibility, wrap, ticket_base_url, ticket_kb_search_endpoint, ticket_file_uploads_enabled, ticket_max_file_size, ticket_auto_assign_user_ids, tos].hash + [absolute_and_relative_dates, absolute_dates, allow_anon, allow_anon_flag, allow_anon_votes, allowed_languages, collapse_replies, comment_count_format, comment_html_rendering_mode, comment_thread_delete_mode, commenter_name_format, count_above_toggle, custom_css, default_avatar_src, default_sort_direction, default_username, disable_auto_admin_migration, disable_auto_hash_tag_creation, disable_blocking, disable_commenter_comment_delete, disable_commenter_comment_edit, disable_email_inputs, disable_live_commenting, disable_notification_bell, disable_profile_comments, disable_profile_direct_messages, disable_profiles, disable_success_message, disable_toolbar, disable_unverified_label, disable_voting, enable_commenter_links, enable_search, enable_spoilers, enable_third_party_cookie_bypass, enable_view_counts, enable_vote_list, enable_wysiwyg, gif_rating, has_dark_background, header_html, hide_avatars, hide_comments_under_count_text_format, image_content_profanity_level, input_after_comments, limit_comments_by_groups, locale, max_comment_character_length, max_comment_created_count_pupm, no_custom_config, mention_auto_complete_mode, no_image_uploads, allow_embeds, allowed_embed_domains, no_styles, page_size, readonly, no_new_root_comments, require_sso, enable_f_chat, enable_resize_handle, restricted_link_domains, show_badges_in_top_bar, show_comment_save_success, show_live_right_away, show_question, spam_rules, sso_sec_lvl, translations, use_show_comments_toggle, use_single_line_comment_input, vote_style, widget_question_id, widget_question_results_style, widget_question_show_breakdown, widget_question_style, widget_question_when_to_save, widget_questions_required, widget_sub_question_visibility, wrap, users_list_location, users_list_include_offline, ticket_base_url, ticket_kb_search_endpoint, ticket_file_uploads_enabled, ticket_max_file_size, ticket_auto_assign_user_ids, tos].hash end # Builds the object from hash @@ -914,6 +962,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -930,6 +1033,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/custom_email_template.rb b/client/lib/fastcomments-client/models/custom_email_template.rb index 41b245f..3baa6e0 100644 --- a/client/lib/fastcomments-client/models/custom_email_template.rb +++ b/client/lib/fastcomments-client/models/custom_email_template.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class CustomEmailTemplate < ApiModelBase + class CustomEmailTemplate attr_accessor :_id attr_accessor :tenant_id @@ -348,6 +348,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -364,6 +419,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/delete_comment200_response.rb b/client/lib/fastcomments-client/models/delete_comment200_response.rb deleted file mode 100644 index acca34e..0000000 --- a/client/lib/fastcomments-client/models/delete_comment200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module DeleteComment200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'DeleteCommentResult' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/delete_comment_action.rb b/client/lib/fastcomments-client/models/delete_comment_action.rb index 0a78a7c..a75057c 100644 --- a/client/lib/fastcomments-client/models/delete_comment_action.rb +++ b/client/lib/fastcomments-client/models/delete_comment_action.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/delete_comment_public200_response.rb b/client/lib/fastcomments-client/models/delete_comment_public200_response.rb deleted file mode 100644 index 280666d..0000000 --- a/client/lib/fastcomments-client/models/delete_comment_public200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module DeleteCommentPublic200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'PublicAPIDeleteCommentResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/delete_comment_result.rb b/client/lib/fastcomments-client/models/delete_comment_result.rb index 036e982..1fddde0 100644 --- a/client/lib/fastcomments-client/models/delete_comment_result.rb +++ b/client/lib/fastcomments-client/models/delete_comment_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class DeleteCommentResult < ApiModelBase + class DeleteCommentResult attr_accessor :action attr_accessor :status @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/delete_comment_vote200_response.rb b/client/lib/fastcomments-client/models/delete_comment_vote200_response.rb deleted file mode 100644 index b5c0479..0000000 --- a/client/lib/fastcomments-client/models/delete_comment_vote200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module DeleteCommentVote200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'VoteDeleteResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/delete_domain_config200_response.rb b/client/lib/fastcomments-client/models/delete_domain_config200_response.rb deleted file mode 100644 index 3821311..0000000 --- a/client/lib/fastcomments-client/models/delete_domain_config200_response.rb +++ /dev/null @@ -1,150 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - class DeleteDomainConfig200Response < ApiModelBase - attr_accessor :status - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'status' => :'status' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'status' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - :'status' - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::DeleteDomainConfig200Response` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::DeleteDomainConfig200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'status') - self.status = attributes[:'status'] - else - self.status = nil - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - status == o.status - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [status].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - end - -end diff --git a/client/lib/fastcomments-client/models/delete_domain_config_response.rb b/client/lib/fastcomments-client/models/delete_domain_config_response.rb new file mode 100644 index 0000000..9fe4b5b --- /dev/null +++ b/client/lib/fastcomments-client/models/delete_domain_config_response.rb @@ -0,0 +1,223 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class DeleteDomainConfigResponse + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'status' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::DeleteDomainConfigResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::DeleteDomainConfigResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/delete_feed_post_public200_response.rb b/client/lib/fastcomments-client/models/delete_feed_post_public200_response.rb deleted file mode 100644 index be96fa0..0000000 --- a/client/lib/fastcomments-client/models/delete_feed_post_public200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module DeleteFeedPostPublic200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'DeleteFeedPostPublic200ResponseAnyOf' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/delete_feed_post_public200_response_any_of.rb b/client/lib/fastcomments-client/models/delete_feed_post_public_response.rb similarity index 67% rename from client/lib/fastcomments-client/models/delete_feed_post_public200_response_any_of.rb rename to client/lib/fastcomments-client/models/delete_feed_post_public_response.rb index 3ed2740..7971180 100644 --- a/client/lib/fastcomments-client/models/delete_feed_post_public200_response_any_of.rb +++ b/client/lib/fastcomments-client/models/delete_feed_post_public_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class DeleteFeedPostPublic200ResponseAnyOf < ApiModelBase + class DeleteFeedPostPublicResponse attr_accessor :status class EnumAttributeValidator @@ -73,14 +73,14 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::DeleteFeedPostPublic200ResponseAnyOf` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::DeleteFeedPostPublicResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::DeleteFeedPostPublic200ResponseAnyOf`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::DeleteFeedPostPublicResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -165,6 +165,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -181,6 +236,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/delete_hash_tag_request.rb b/client/lib/fastcomments-client/models/delete_hash_tag_request_body.rb similarity index 62% rename from client/lib/fastcomments-client/models/delete_hash_tag_request.rb rename to client/lib/fastcomments-client/models/delete_hash_tag_request_body.rb index 6530f3c..1c787ed 100644 --- a/client/lib/fastcomments-client/models/delete_hash_tag_request.rb +++ b/client/lib/fastcomments-client/models/delete_hash_tag_request_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class DeleteHashTagRequest < ApiModelBase + class DeleteHashTagRequestBody attr_accessor :tenant_id # Attribute mapping from ruby-style variable name to JSON key. @@ -51,14 +51,14 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::DeleteHashTagRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::DeleteHashTagRequestBody` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::DeleteHashTagRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::DeleteHashTagRequestBody`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -126,6 +126,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -142,6 +197,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/delete_page_api_response.rb b/client/lib/fastcomments-client/models/delete_page_api_response.rb index 4010aa7..a4d137e 100644 --- a/client/lib/fastcomments-client/models/delete_page_api_response.rb +++ b/client/lib/fastcomments-client/models/delete_page_api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class DeletePageAPIResponse < ApiModelBase + class DeletePageAPIResponse attr_accessor :reason attr_accessor :code @@ -161,6 +161,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -177,6 +232,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/delete_sso_user_api_response.rb b/client/lib/fastcomments-client/models/delete_sso_user_api_response.rb index e0ba667..f43d076 100644 --- a/client/lib/fastcomments-client/models/delete_sso_user_api_response.rb +++ b/client/lib/fastcomments-client/models/delete_sso_user_api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class DeleteSSOUserAPIResponse < ApiModelBase + class DeleteSSOUserAPIResponse attr_accessor :reason attr_accessor :code @@ -170,6 +170,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -186,6 +241,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/delete_subscription_api_response.rb b/client/lib/fastcomments-client/models/delete_subscription_api_response.rb index a0bdca0..7ae9a33 100644 --- a/client/lib/fastcomments-client/models/delete_subscription_api_response.rb +++ b/client/lib/fastcomments-client/models/delete_subscription_api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class DeleteSubscriptionAPIResponse < ApiModelBase + class DeleteSubscriptionAPIResponse attr_accessor :reason attr_accessor :code @@ -161,6 +161,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -177,6 +232,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/deleted_comment_result_comment.rb b/client/lib/fastcomments-client/models/deleted_comment_result_comment.rb index a47c1b2..feac24e 100644 --- a/client/lib/fastcomments-client/models/deleted_comment_result_comment.rb +++ b/client/lib/fastcomments-client/models/deleted_comment_result_comment.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class DeletedCommentResultComment < ApiModelBase + class DeletedCommentResultComment attr_accessor :is_deleted attr_accessor :comment_html @@ -188,6 +188,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -204,6 +259,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/digest_email_frequency.rb b/client/lib/fastcomments-client/models/digest_email_frequency.rb index ee5c139..3bb0541 100644 --- a/client/lib/fastcomments-client/models/digest_email_frequency.rb +++ b/client/lib/fastcomments-client/models/digest_email_frequency.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/email_template_definition.rb b/client/lib/fastcomments-client/models/email_template_definition.rb index 51baefb..38da101 100644 --- a/client/lib/fastcomments-client/models/email_template_definition.rb +++ b/client/lib/fastcomments-client/models/email_template_definition.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class EmailTemplateDefinition < ApiModelBase + class EmailTemplateDefinition attr_accessor :email_template_id # Construct a type with a set of properties K of type T @@ -227,6 +227,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -243,6 +298,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/email_template_render_error_response.rb b/client/lib/fastcomments-client/models/email_template_render_error_response.rb index 1b1dc18..c19aa87 100644 --- a/client/lib/fastcomments-client/models/email_template_render_error_response.rb +++ b/client/lib/fastcomments-client/models/email_template_render_error_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class EmailTemplateRenderErrorResponse < ApiModelBase + class EmailTemplateRenderErrorResponse attr_accessor :id attr_accessor :tenant_id @@ -299,6 +299,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -315,6 +370,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/event_log_entry.rb b/client/lib/fastcomments-client/models/event_log_entry.rb index b66e765..359bcbc 100644 --- a/client/lib/fastcomments-client/models/event_log_entry.rb +++ b/client/lib/fastcomments-client/models/event_log_entry.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class EventLogEntry < ApiModelBase + class EventLogEntry attr_accessor :_id attr_accessor :created_at @@ -273,6 +273,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -289,6 +344,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/f_comment.rb b/client/lib/fastcomments-client/models/f_comment.rb index 9ea3399..a97a4e8 100644 --- a/client/lib/fastcomments-client/models/f_comment.rb +++ b/client/lib/fastcomments-client/models/f_comment.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class FComment < ApiModelBase + class FComment attr_accessor :_id attr_accessor :tenant_id @@ -159,6 +159,8 @@ class FComment < ApiModelBase attr_accessor :tos_accepted_at + attr_accessor :bot_id + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -233,7 +235,8 @@ def self.attribute_map :'view_count' => :'viewCount', :'requires_verification' => :'requiresVerification', :'edit_key' => :'editKey', - :'tos_accepted_at' => :'tosAcceptedAt' + :'tos_accepted_at' => :'tosAcceptedAt', + :'bot_id' => :'botId' } end @@ -321,7 +324,8 @@ def self.openapi_types :'view_count' => :'Integer', :'requires_verification' => :'Boolean', :'edit_key' => :'String', - :'tos_accepted_at' => :'Time' + :'tos_accepted_at' => :'Time', + :'bot_id' => :'String' } end @@ -703,6 +707,10 @@ def initialize(attributes = {}) if attributes.key?(:'tos_accepted_at') self.tos_accepted_at = attributes[:'tos_accepted_at'] end + + if attributes.key?(:'bot_id') + self.bot_id = attributes[:'bot_id'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -931,7 +939,8 @@ def ==(o) view_count == o.view_count && requires_verification == o.requires_verification && edit_key == o.edit_key && - tos_accepted_at == o.tos_accepted_at + tos_accepted_at == o.tos_accepted_at && + bot_id == o.bot_id end # @see the `==` method @@ -943,7 +952,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [_id, tenant_id, url_id, url_id_raw, url, page_title, user_id, anon_user_id, commenter_email, commenter_name, commenter_link, comment, comment_html, parent_id, date, local_date_string, local_date_hours, votes, votes_up, votes_down, expire_at, verified, verified_date, verification_id, notification_sent_for_parent, notification_sent_for_parent_tenant, reviewed, imported, external_id, external_parent_id, avatar_src, is_spam, perm_not_spam, ai_determined_spam, has_images, page_number, page_number_of, page_number_nf, has_links, has_code, approved, locale, is_deleted, is_deleted_user, is_banned_user, is_by_admin, is_by_moderator, is_pinned, is_locked, flag_count, rating, display_label, from_product_id, meta, ip_hash, mentions, hash_tags, badges, domain, veteran_badge_processed, moderation_group_ids, did_process_badges, from_offline_restore, autoplay_job_id, autoplay_delay_ms, feedback_ids, logs, group_ids, view_count, requires_verification, edit_key, tos_accepted_at].hash + [_id, tenant_id, url_id, url_id_raw, url, page_title, user_id, anon_user_id, commenter_email, commenter_name, commenter_link, comment, comment_html, parent_id, date, local_date_string, local_date_hours, votes, votes_up, votes_down, expire_at, verified, verified_date, verification_id, notification_sent_for_parent, notification_sent_for_parent_tenant, reviewed, imported, external_id, external_parent_id, avatar_src, is_spam, perm_not_spam, ai_determined_spam, has_images, page_number, page_number_of, page_number_nf, has_links, has_code, approved, locale, is_deleted, is_deleted_user, is_banned_user, is_by_admin, is_by_moderator, is_pinned, is_locked, flag_count, rating, display_label, from_product_id, meta, ip_hash, mentions, hash_tags, badges, domain, veteran_badge_processed, moderation_group_ids, did_process_badges, from_offline_restore, autoplay_job_id, autoplay_delay_ms, feedback_ids, logs, group_ids, view_count, requires_verification, edit_key, tos_accepted_at, bot_id].hash end # Builds the object from hash @@ -969,6 +978,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -985,6 +1049,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/f_comment_meta.rb b/client/lib/fastcomments-client/models/f_comment_meta.rb index aa74529..07d979e 100644 --- a/client/lib/fastcomments-client/models/f_comment_meta.rb +++ b/client/lib/fastcomments-client/models/f_comment_meta.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class FCommentMeta < ApiModelBase + class FCommentMeta attr_accessor :wp_id attr_accessor :wp_user_id @@ -144,6 +144,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -160,6 +215,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/feed_post.rb b/client/lib/fastcomments-client/models/feed_post.rb index 6abea45..b37d867 100644 --- a/client/lib/fastcomments-client/models/feed_post.rb +++ b/client/lib/fastcomments-client/models/feed_post.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class FeedPost < ApiModelBase + class FeedPost attr_accessor :_id attr_accessor :tenant_id @@ -326,6 +326,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -342,6 +397,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/feed_post_link.rb b/client/lib/fastcomments-client/models/feed_post_link.rb index 72a56a7..200d273 100644 --- a/client/lib/fastcomments-client/models/feed_post_link.rb +++ b/client/lib/fastcomments-client/models/feed_post_link.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class FeedPostLink < ApiModelBase + class FeedPostLink attr_accessor :text attr_accessor :title @@ -153,6 +153,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -169,6 +224,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/feed_post_media_item.rb b/client/lib/fastcomments-client/models/feed_post_media_item.rb index c6fa043..7945146 100644 --- a/client/lib/fastcomments-client/models/feed_post_media_item.rb +++ b/client/lib/fastcomments-client/models/feed_post_media_item.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class FeedPostMediaItem < ApiModelBase + class FeedPostMediaItem attr_accessor :title attr_accessor :link_url @@ -163,6 +163,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -179,6 +234,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/feed_post_media_item_asset.rb b/client/lib/fastcomments-client/models/feed_post_media_item_asset.rb index 61cba83..e3e07c3 100644 --- a/client/lib/fastcomments-client/models/feed_post_media_item_asset.rb +++ b/client/lib/fastcomments-client/models/feed_post_media_item_asset.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class FeedPostMediaItemAsset < ApiModelBase + class FeedPostMediaItemAsset attr_accessor :w attr_accessor :h @@ -195,6 +195,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -211,6 +266,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/feed_post_stats.rb b/client/lib/fastcomments-client/models/feed_post_stats.rb index a2eb4b5..d4c4330 100644 --- a/client/lib/fastcomments-client/models/feed_post_stats.rb +++ b/client/lib/fastcomments-client/models/feed_post_stats.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class FeedPostStats < ApiModelBase + class FeedPostStats attr_accessor :reacts attr_accessor :comment_count @@ -137,6 +137,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -153,6 +208,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/feed_posts_stats_response.rb b/client/lib/fastcomments-client/models/feed_posts_stats_response.rb index c92a22a..0d9bc6f 100644 --- a/client/lib/fastcomments-client/models/feed_posts_stats_response.rb +++ b/client/lib/fastcomments-client/models/feed_posts_stats_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class FeedPostsStatsResponse < ApiModelBase + class FeedPostsStatsResponse attr_accessor :status attr_accessor :stats @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/find_comments_by_range_item.rb b/client/lib/fastcomments-client/models/find_comments_by_range_item.rb index ceeda2b..694bbd6 100644 --- a/client/lib/fastcomments-client/models/find_comments_by_range_item.rb +++ b/client/lib/fastcomments-client/models/find_comments_by_range_item.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class FindCommentsByRangeItem < ApiModelBase + class FindCommentsByRangeItem attr_accessor :comment attr_accessor :result @@ -155,6 +155,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -171,6 +226,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/find_comments_by_range_response.rb b/client/lib/fastcomments-client/models/find_comments_by_range_response.rb index 468a651..7311d8b 100644 --- a/client/lib/fastcomments-client/models/find_comments_by_range_response.rb +++ b/client/lib/fastcomments-client/models/find_comments_by_range_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class FindCommentsByRangeResponse < ApiModelBase + class FindCommentsByRangeResponse attr_accessor :results attr_accessor :created_at @@ -171,6 +171,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -187,6 +242,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/flag_comment200_response.rb b/client/lib/fastcomments-client/models/flag_comment200_response.rb deleted file mode 100644 index eca68c3..0000000 --- a/client/lib/fastcomments-client/models/flag_comment200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module FlagComment200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'FlagCommentResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/flag_comment_public200_response.rb b/client/lib/fastcomments-client/models/flag_comment_public200_response.rb deleted file mode 100644 index 50f1adb..0000000 --- a/client/lib/fastcomments-client/models/flag_comment_public200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module FlagCommentPublic200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIEmptyResponse', - :'APIError' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/flag_comment_response.rb b/client/lib/fastcomments-client/models/flag_comment_response.rb index bc9b5c2..366f53d 100644 --- a/client/lib/fastcomments-client/models/flag_comment_response.rb +++ b/client/lib/fastcomments-client/models/flag_comment_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class FlagCommentResponse < ApiModelBase + class FlagCommentResponse attr_accessor :status_code attr_accessor :status @@ -201,6 +201,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -217,6 +272,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_audit_logs200_response.rb b/client/lib/fastcomments-client/models/get_audit_logs200_response.rb deleted file mode 100644 index a7a6779..0000000 --- a/client/lib/fastcomments-client/models/get_audit_logs200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetAuditLogs200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetAuditLogsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_audit_logs_response.rb b/client/lib/fastcomments-client/models/get_audit_logs_response.rb index 1ea2a72..3749295 100644 --- a/client/lib/fastcomments-client/models/get_audit_logs_response.rb +++ b/client/lib/fastcomments-client/models/get_audit_logs_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetAuditLogsResponse < ApiModelBase + class GetAuditLogsResponse attr_accessor :status attr_accessor :audit_logs @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_banned_users_count_response.rb b/client/lib/fastcomments-client/models/get_banned_users_count_response.rb new file mode 100644 index 0000000..952c79c --- /dev/null +++ b/client/lib/fastcomments-client/models/get_banned_users_count_response.rb @@ -0,0 +1,263 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GetBannedUsersCountResponse + attr_accessor :total_count + + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'total_count' => :'totalCount', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'total_count' => :'Float', + :'status' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetBannedUsersCountResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetBannedUsersCountResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'total_count') + self.total_count = attributes[:'total_count'] + else + self.total_count = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @total_count.nil? + invalid_properties.push('invalid value for "total_count", total_count cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @total_count.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] total_count Value to be assigned + def total_count=(total_count) + if total_count.nil? + fail ArgumentError, 'total_count cannot be nil' + end + + @total_count = total_count + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + total_count == o.total_count && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [total_count, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/get_banned_users_from_comment_response.rb b/client/lib/fastcomments-client/models/get_banned_users_from_comment_response.rb new file mode 100644 index 0000000..a5b8775 --- /dev/null +++ b/client/lib/fastcomments-client/models/get_banned_users_from_comment_response.rb @@ -0,0 +1,308 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GetBannedUsersFromCommentResponse + attr_accessor :banned_users + + attr_accessor :code + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'banned_users' => :'bannedUsers', + :'code' => :'code', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'banned_users' => :'Array', + :'code' => :'String', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetBannedUsersFromCommentResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetBannedUsersFromCommentResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'banned_users') + if (value = attributes[:'banned_users']).is_a?(Array) + self.banned_users = value + end + else + self.banned_users = nil + end + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @banned_users.nil? + invalid_properties.push('invalid value for "banned_users", banned_users cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @banned_users.nil? + code_validator = EnumAttributeValidator.new('String', ["not-found", "not-logged-in"]) + return false unless code_validator.valid?(@code) + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] banned_users Value to be assigned + def banned_users=(banned_users) + if banned_users.nil? + fail ArgumentError, 'banned_users cannot be nil' + end + + @banned_users = banned_users + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["not-found", "not-logged-in"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + end + @code = code + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + banned_users == o.banned_users && + code == o.code && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [banned_users, code, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/get_cached_notification_count200_response.rb b/client/lib/fastcomments-client/models/get_cached_notification_count200_response.rb deleted file mode 100644 index 3ead01b..0000000 --- a/client/lib/fastcomments-client/models/get_cached_notification_count200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetCachedNotificationCount200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetCachedNotificationCountResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_cached_notification_count_response.rb b/client/lib/fastcomments-client/models/get_cached_notification_count_response.rb index 3a3384f..f2ba1f4 100644 --- a/client/lib/fastcomments-client/models/get_cached_notification_count_response.rb +++ b/client/lib/fastcomments-client/models/get_cached_notification_count_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetCachedNotificationCountResponse < ApiModelBase + class GetCachedNotificationCountResponse attr_accessor :status attr_accessor :data @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_comment200_response.rb b/client/lib/fastcomments-client/models/get_comment200_response.rb deleted file mode 100644 index 2c32ef1..0000000 --- a/client/lib/fastcomments-client/models/get_comment200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetComment200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'APIGetCommentResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_comment_ban_status_response.rb b/client/lib/fastcomments-client/models/get_comment_ban_status_response.rb new file mode 100644 index 0000000..5036baf --- /dev/null +++ b/client/lib/fastcomments-client/models/get_comment_ban_status_response.rb @@ -0,0 +1,261 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GetCommentBanStatusResponse + attr_accessor :status + + attr_accessor :email_domain + + attr_accessor :can_ip_ban + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'email_domain' => :'emailDomain', + :'can_ip_ban' => :'canIPBan' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'String', + :'email_domain' => :'String', + :'can_ip_ban' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'email_domain', + :'can_ip_ban' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetCommentBanStatusResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetCommentBanStatusResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'email_domain') + self.email_domain = attributes[:'email_domain'] + else + self.email_domain = nil + end + + if attributes.key?(:'can_ip_ban') + self.can_ip_ban = attributes[:'can_ip_ban'] + else + self.can_ip_ban = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + email_domain == o.email_domain && + can_ip_ban == o.can_ip_ban + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, email_domain, can_ip_ban].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/get_comment_text200_response.rb b/client/lib/fastcomments-client/models/get_comment_text200_response.rb deleted file mode 100644 index 4088a41..0000000 --- a/client/lib/fastcomments-client/models/get_comment_text200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetCommentText200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'PublicAPIGetCommentTextResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_comment_text_response.rb b/client/lib/fastcomments-client/models/get_comment_text_response.rb new file mode 100644 index 0000000..f40def9 --- /dev/null +++ b/client/lib/fastcomments-client/models/get_comment_text_response.rb @@ -0,0 +1,269 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GetCommentTextResponse + attr_accessor :comment + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'comment' => :'comment', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'comment' => :'String', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'comment', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetCommentTextResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetCommentTextResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'comment') + self.comment = attributes[:'comment'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + comment == o.comment && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [comment, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/get_comment_vote_user_names200_response.rb b/client/lib/fastcomments-client/models/get_comment_vote_user_names200_response.rb deleted file mode 100644 index d21348e..0000000 --- a/client/lib/fastcomments-client/models/get_comment_vote_user_names200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetCommentVoteUserNames200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetCommentVoteUserNamesSuccessResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_comment_vote_user_names_success_response.rb b/client/lib/fastcomments-client/models/get_comment_vote_user_names_success_response.rb index d5b4532..29c4c96 100644 --- a/client/lib/fastcomments-client/models/get_comment_vote_user_names_success_response.rb +++ b/client/lib/fastcomments-client/models/get_comment_vote_user_names_success_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetCommentVoteUserNamesSuccessResponse < ApiModelBase + class GetCommentVoteUserNamesSuccessResponse attr_accessor :status attr_accessor :vote_user_names @@ -219,6 +219,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -235,6 +290,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_comments200_response.rb b/client/lib/fastcomments-client/models/get_comments200_response.rb deleted file mode 100644 index 760813e..0000000 --- a/client/lib/fastcomments-client/models/get_comments200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetComments200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'APIGetCommentsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_comments_for_user_response.rb b/client/lib/fastcomments-client/models/get_comments_for_user_response.rb new file mode 100644 index 0000000..93884d8 --- /dev/null +++ b/client/lib/fastcomments-client/models/get_comments_for_user_response.rb @@ -0,0 +1,222 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GetCommentsForUserResponse + attr_accessor :moderating_tenant_ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'moderating_tenant_ids' => :'moderatingTenantIds' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'moderating_tenant_ids' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetCommentsForUserResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetCommentsForUserResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'moderating_tenant_ids') + if (value = attributes[:'moderating_tenant_ids']).is_a?(Array) + self.moderating_tenant_ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + moderating_tenant_ids == o.moderating_tenant_ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [moderating_tenant_ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/get_comments_public200_response.rb b/client/lib/fastcomments-client/models/get_comments_public200_response.rb deleted file mode 100644 index 255906a..0000000 --- a/client/lib/fastcomments-client/models/get_comments_public200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetCommentsPublic200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetCommentsResponseWithPresencePublicComment' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_comments_response_public_comment.rb b/client/lib/fastcomments-client/models/get_comments_response_public_comment.rb index 2df7e1a..8bf80a4 100644 --- a/client/lib/fastcomments-client/models/get_comments_response_public_comment.rb +++ b/client/lib/fastcomments-client/models/get_comments_response_public_comment.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetCommentsResponsePublicComment < ApiModelBase + class GetCommentsResponsePublicComment attr_accessor :status_code attr_accessor :status @@ -393,6 +393,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -409,6 +464,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_comments_response_with_presence_public_comment.rb b/client/lib/fastcomments-client/models/get_comments_response_with_presence_public_comment.rb index 455c823..1f9ba15 100644 --- a/client/lib/fastcomments-client/models/get_comments_response_with_presence_public_comment.rb +++ b/client/lib/fastcomments-client/models/get_comments_response_with_presence_public_comment.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetCommentsResponseWithPresencePublicComment < ApiModelBase + class GetCommentsResponseWithPresencePublicComment attr_accessor :status_code attr_accessor :status @@ -428,6 +428,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -444,6 +499,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_domain_config200_response.rb b/client/lib/fastcomments-client/models/get_domain_config200_response.rb deleted file mode 100644 index deac74e..0000000 --- a/client/lib/fastcomments-client/models/get_domain_config200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetDomainConfig200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'AddDomainConfig200ResponseAnyOf', - :'GetDomainConfigs200ResponseAnyOf1' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_domain_config_response.rb b/client/lib/fastcomments-client/models/get_domain_config_response.rb new file mode 100644 index 0000000..13d3978 --- /dev/null +++ b/client/lib/fastcomments-client/models/get_domain_config_response.rb @@ -0,0 +1,104 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + module GetDomainConfigResponse + class << self + # List of class defined in anyOf (OpenAPI v3) + def openapi_any_of + [ + :'AddDomainConfigResponseAnyOf', + :'GetDomainConfigsResponseAnyOf1' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of anyOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of anyOf items and attempt to identify the appropriate one. + # Note: + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_any_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_any_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass, data) + return if data.nil? + + case klass.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.iso8601(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type, item) } + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } + end + else # model + const = FastCommentsClient.const_get(klass) + if const + if const.respond_to?(:openapi_any_of) # nested anyOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue + raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" + end + end + end + +end diff --git a/client/lib/fastcomments-client/models/get_domain_configs200_response.rb b/client/lib/fastcomments-client/models/get_domain_configs200_response.rb deleted file mode 100644 index b7dd562..0000000 --- a/client/lib/fastcomments-client/models/get_domain_configs200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetDomainConfigs200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'GetDomainConfigs200ResponseAnyOf', - :'GetDomainConfigs200ResponseAnyOf1' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_domain_configs_response.rb b/client/lib/fastcomments-client/models/get_domain_configs_response.rb new file mode 100644 index 0000000..289db1b --- /dev/null +++ b/client/lib/fastcomments-client/models/get_domain_configs_response.rb @@ -0,0 +1,104 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + module GetDomainConfigsResponse + class << self + # List of class defined in anyOf (OpenAPI v3) + def openapi_any_of + [ + :'GetDomainConfigsResponseAnyOf', + :'GetDomainConfigsResponseAnyOf1' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of anyOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of anyOf items and attempt to identify the appropriate one. + # Note: + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_any_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_any_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass, data) + return if data.nil? + + case klass.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.iso8601(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type, item) } + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } + end + else # model + const = FastCommentsClient.const_get(klass) + if const + if const.respond_to?(:openapi_any_of) # nested anyOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue + raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" + end + end + end + +end diff --git a/client/lib/fastcomments-client/models/get_domain_configs200_response_any_of.rb b/client/lib/fastcomments-client/models/get_domain_configs_response_any_of.rb similarity index 64% rename from client/lib/fastcomments-client/models/get_domain_configs200_response_any_of.rb rename to client/lib/fastcomments-client/models/get_domain_configs_response_any_of.rb index 5c46fdc..7533976 100644 --- a/client/lib/fastcomments-client/models/get_domain_configs200_response_any_of.rb +++ b/client/lib/fastcomments-client/models/get_domain_configs_response_any_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetDomainConfigs200ResponseAnyOf < ApiModelBase + class GetDomainConfigsResponseAnyOf attr_accessor :configurations attr_accessor :status @@ -57,14 +57,14 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetDomainConfigs200ResponseAnyOf` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetDomainConfigsResponseAnyOf` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetDomainConfigs200ResponseAnyOf`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetDomainConfigsResponseAnyOf`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -141,6 +141,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -157,6 +212,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_domain_configs200_response_any_of1.rb b/client/lib/fastcomments-client/models/get_domain_configs_response_any_of1.rb similarity index 68% rename from client/lib/fastcomments-client/models/get_domain_configs200_response_any_of1.rb rename to client/lib/fastcomments-client/models/get_domain_configs_response_any_of1.rb index 1d6e617..5977047 100644 --- a/client/lib/fastcomments-client/models/get_domain_configs200_response_any_of1.rb +++ b/client/lib/fastcomments-client/models/get_domain_configs_response_any_of1.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetDomainConfigs200ResponseAnyOf1 < ApiModelBase + class GetDomainConfigsResponseAnyOf1 attr_accessor :reason attr_accessor :code @@ -60,14 +60,14 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetDomainConfigs200ResponseAnyOf1` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetDomainConfigsResponseAnyOf1` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetDomainConfigs200ResponseAnyOf1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetDomainConfigsResponseAnyOf1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -181,6 +181,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -197,6 +252,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_email_template200_response.rb b/client/lib/fastcomments-client/models/get_email_template200_response.rb deleted file mode 100644 index 327b87c..0000000 --- a/client/lib/fastcomments-client/models/get_email_template200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetEmailTemplate200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetEmailTemplateResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_email_template_definitions200_response.rb b/client/lib/fastcomments-client/models/get_email_template_definitions200_response.rb deleted file mode 100644 index 6ec7684..0000000 --- a/client/lib/fastcomments-client/models/get_email_template_definitions200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetEmailTemplateDefinitions200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetEmailTemplateDefinitionsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_email_template_definitions_response.rb b/client/lib/fastcomments-client/models/get_email_template_definitions_response.rb index ccedeb0..b0ddd65 100644 --- a/client/lib/fastcomments-client/models/get_email_template_definitions_response.rb +++ b/client/lib/fastcomments-client/models/get_email_template_definitions_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetEmailTemplateDefinitionsResponse < ApiModelBase + class GetEmailTemplateDefinitionsResponse attr_accessor :status attr_accessor :definitions @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_email_template_render_errors200_response.rb b/client/lib/fastcomments-client/models/get_email_template_render_errors200_response.rb deleted file mode 100644 index 92ea931..0000000 --- a/client/lib/fastcomments-client/models/get_email_template_render_errors200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetEmailTemplateRenderErrors200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetEmailTemplateRenderErrorsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_email_template_render_errors_response.rb b/client/lib/fastcomments-client/models/get_email_template_render_errors_response.rb index 48c1a8a..84ffb02 100644 --- a/client/lib/fastcomments-client/models/get_email_template_render_errors_response.rb +++ b/client/lib/fastcomments-client/models/get_email_template_render_errors_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetEmailTemplateRenderErrorsResponse < ApiModelBase + class GetEmailTemplateRenderErrorsResponse attr_accessor :status attr_accessor :render_errors @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_email_template_response.rb b/client/lib/fastcomments-client/models/get_email_template_response.rb index f170c78..7d36bb4 100644 --- a/client/lib/fastcomments-client/models/get_email_template_response.rb +++ b/client/lib/fastcomments-client/models/get_email_template_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetEmailTemplateResponse < ApiModelBase + class GetEmailTemplateResponse attr_accessor :status attr_accessor :email_template @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_email_templates200_response.rb b/client/lib/fastcomments-client/models/get_email_templates200_response.rb deleted file mode 100644 index 78f672a..0000000 --- a/client/lib/fastcomments-client/models/get_email_templates200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetEmailTemplates200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetEmailTemplatesResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_email_templates_response.rb b/client/lib/fastcomments-client/models/get_email_templates_response.rb index bbd071e..c450a7b 100644 --- a/client/lib/fastcomments-client/models/get_email_templates_response.rb +++ b/client/lib/fastcomments-client/models/get_email_templates_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetEmailTemplatesResponse < ApiModelBase + class GetEmailTemplatesResponse attr_accessor :status attr_accessor :email_templates @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_event_log200_response.rb b/client/lib/fastcomments-client/models/get_event_log200_response.rb deleted file mode 100644 index e0b65d3..0000000 --- a/client/lib/fastcomments-client/models/get_event_log200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetEventLog200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetEventLogResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_event_log_response.rb b/client/lib/fastcomments-client/models/get_event_log_response.rb index ba22ca8..6961526 100644 --- a/client/lib/fastcomments-client/models/get_event_log_response.rb +++ b/client/lib/fastcomments-client/models/get_event_log_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetEventLogResponse < ApiModelBase + class GetEventLogResponse attr_accessor :events attr_accessor :status @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_feed_posts200_response.rb b/client/lib/fastcomments-client/models/get_feed_posts200_response.rb deleted file mode 100644 index 838831e..0000000 --- a/client/lib/fastcomments-client/models/get_feed_posts200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetFeedPosts200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetFeedPostsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_feed_posts_public200_response.rb b/client/lib/fastcomments-client/models/get_feed_posts_public200_response.rb deleted file mode 100644 index a3a7850..0000000 --- a/client/lib/fastcomments-client/models/get_feed_posts_public200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetFeedPostsPublic200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'PublicFeedPostsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_feed_posts_response.rb b/client/lib/fastcomments-client/models/get_feed_posts_response.rb index 0808e9c..fdc7330 100644 --- a/client/lib/fastcomments-client/models/get_feed_posts_response.rb +++ b/client/lib/fastcomments-client/models/get_feed_posts_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetFeedPostsResponse < ApiModelBase + class GetFeedPostsResponse attr_accessor :status attr_accessor :feed_posts @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_feed_posts_stats200_response.rb b/client/lib/fastcomments-client/models/get_feed_posts_stats200_response.rb deleted file mode 100644 index 6bcfc60..0000000 --- a/client/lib/fastcomments-client/models/get_feed_posts_stats200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetFeedPostsStats200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'FeedPostsStatsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/add_hash_tags_bulk200_response.rb b/client/lib/fastcomments-client/models/get_gifs_search_response.rb similarity index 93% rename from client/lib/fastcomments-client/models/add_hash_tags_bulk200_response.rb rename to client/lib/fastcomments-client/models/get_gifs_search_response.rb index aef7a71..c00a6af 100644 --- a/client/lib/fastcomments-client/models/add_hash_tags_bulk200_response.rb +++ b/client/lib/fastcomments-client/models/get_gifs_search_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,13 +14,13 @@ require 'time' module FastCommentsClient - module AddHashTagsBulk200Response + module GetGifsSearchResponse class << self # List of class defined in anyOf (OpenAPI v3) def openapi_any_of [ - :'APIError', - :'BulkCreateHashTagsResponse' + :'GifSearchInternalError', + :'GifSearchResponse' ] end @@ -37,7 +37,8 @@ def build(data) openapi_any_of.each do |klass| begin next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data rescue # rescue all errors so we keep iterating even if the current item lookup raises end end diff --git a/client/lib/fastcomments-client/models/get_gifs_trending_response.rb b/client/lib/fastcomments-client/models/get_gifs_trending_response.rb new file mode 100644 index 0000000..d813496 --- /dev/null +++ b/client/lib/fastcomments-client/models/get_gifs_trending_response.rb @@ -0,0 +1,104 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + module GetGifsTrendingResponse + class << self + # List of class defined in anyOf (OpenAPI v3) + def openapi_any_of + [ + :'GifSearchInternalError', + :'GifSearchResponse' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of anyOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of anyOf items and attempt to identify the appropriate one. + # Note: + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_any_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_any_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass, data) + return if data.nil? + + case klass.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.iso8601(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type, item) } + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } + end + else # model + const = FastCommentsClient.const_get(klass) + if const + if const.respond_to?(:openapi_any_of) # nested anyOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue + raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" + end + end + end + +end diff --git a/client/lib/fastcomments-client/models/get_hash_tags200_response.rb b/client/lib/fastcomments-client/models/get_hash_tags200_response.rb deleted file mode 100644 index 510efe2..0000000 --- a/client/lib/fastcomments-client/models/get_hash_tags200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetHashTags200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetHashTagsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_hash_tags_response.rb b/client/lib/fastcomments-client/models/get_hash_tags_response.rb index bdc8298..4a61824 100644 --- a/client/lib/fastcomments-client/models/get_hash_tags_response.rb +++ b/client/lib/fastcomments-client/models/get_hash_tags_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetHashTagsResponse < ApiModelBase + class GetHashTagsResponse attr_accessor :status attr_accessor :hash_tags @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_moderator200_response.rb b/client/lib/fastcomments-client/models/get_moderator200_response.rb deleted file mode 100644 index 5534ba1..0000000 --- a/client/lib/fastcomments-client/models/get_moderator200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetModerator200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetModeratorResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_moderator_response.rb b/client/lib/fastcomments-client/models/get_moderator_response.rb index 332d5b7..031c39f 100644 --- a/client/lib/fastcomments-client/models/get_moderator_response.rb +++ b/client/lib/fastcomments-client/models/get_moderator_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetModeratorResponse < ApiModelBase + class GetModeratorResponse attr_accessor :status attr_accessor :moderator @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_moderators200_response.rb b/client/lib/fastcomments-client/models/get_moderators200_response.rb deleted file mode 100644 index a8cd336..0000000 --- a/client/lib/fastcomments-client/models/get_moderators200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetModerators200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetModeratorsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_moderators_response.rb b/client/lib/fastcomments-client/models/get_moderators_response.rb index ebdbeb1..6a20f53 100644 --- a/client/lib/fastcomments-client/models/get_moderators_response.rb +++ b/client/lib/fastcomments-client/models/get_moderators_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetModeratorsResponse < ApiModelBase + class GetModeratorsResponse attr_accessor :status attr_accessor :moderators @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_my_notifications_response.rb b/client/lib/fastcomments-client/models/get_my_notifications_response.rb index 2074470..46b9d36 100644 --- a/client/lib/fastcomments-client/models/get_my_notifications_response.rb +++ b/client/lib/fastcomments-client/models/get_my_notifications_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetMyNotificationsResponse < ApiModelBase + class GetMyNotificationsResponse # Construct a type with a set of properties K of type T attr_accessor :translations @@ -257,6 +257,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -273,6 +328,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_notification_count200_response.rb b/client/lib/fastcomments-client/models/get_notification_count200_response.rb deleted file mode 100644 index c867efc..0000000 --- a/client/lib/fastcomments-client/models/get_notification_count200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetNotificationCount200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetNotificationCountResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_notification_count_response.rb b/client/lib/fastcomments-client/models/get_notification_count_response.rb index 8db3383..7ec1894 100644 --- a/client/lib/fastcomments-client/models/get_notification_count_response.rb +++ b/client/lib/fastcomments-client/models/get_notification_count_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetNotificationCountResponse < ApiModelBase + class GetNotificationCountResponse attr_accessor :status attr_accessor :count @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_notifications200_response.rb b/client/lib/fastcomments-client/models/get_notifications200_response.rb deleted file mode 100644 index bdeacc9..0000000 --- a/client/lib/fastcomments-client/models/get_notifications200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetNotifications200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetNotificationsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_notifications_response.rb b/client/lib/fastcomments-client/models/get_notifications_response.rb index fc29da3..278f698 100644 --- a/client/lib/fastcomments-client/models/get_notifications_response.rb +++ b/client/lib/fastcomments-client/models/get_notifications_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetNotificationsResponse < ApiModelBase + class GetNotificationsResponse attr_accessor :status attr_accessor :notifications @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_page_by_urlid_api_response.rb b/client/lib/fastcomments-client/models/get_page_by_urlid_api_response.rb index 5308bfb..32d1270 100644 --- a/client/lib/fastcomments-client/models/get_page_by_urlid_api_response.rb +++ b/client/lib/fastcomments-client/models/get_page_by_urlid_api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetPageByURLIdAPIResponse < ApiModelBase + class GetPageByURLIdAPIResponse attr_accessor :reason attr_accessor :code @@ -170,6 +170,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -186,6 +241,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_pages_api_response.rb b/client/lib/fastcomments-client/models/get_pages_api_response.rb index 41e9bf6..fc818d3 100644 --- a/client/lib/fastcomments-client/models/get_pages_api_response.rb +++ b/client/lib/fastcomments-client/models/get_pages_api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetPagesAPIResponse < ApiModelBase + class GetPagesAPIResponse attr_accessor :reason attr_accessor :code @@ -172,6 +172,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -188,6 +243,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_pending_webhook_event_count200_response.rb b/client/lib/fastcomments-client/models/get_pending_webhook_event_count200_response.rb deleted file mode 100644 index 3154c9b..0000000 --- a/client/lib/fastcomments-client/models/get_pending_webhook_event_count200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetPendingWebhookEventCount200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetPendingWebhookEventCountResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_pending_webhook_event_count_response.rb b/client/lib/fastcomments-client/models/get_pending_webhook_event_count_response.rb index 12dd4e5..57c05be 100644 --- a/client/lib/fastcomments-client/models/get_pending_webhook_event_count_response.rb +++ b/client/lib/fastcomments-client/models/get_pending_webhook_event_count_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetPendingWebhookEventCountResponse < ApiModelBase + class GetPendingWebhookEventCountResponse attr_accessor :status attr_accessor :count @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_pending_webhook_events200_response.rb b/client/lib/fastcomments-client/models/get_pending_webhook_events200_response.rb deleted file mode 100644 index 7c551fb..0000000 --- a/client/lib/fastcomments-client/models/get_pending_webhook_events200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetPendingWebhookEvents200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetPendingWebhookEventsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_pending_webhook_events_response.rb b/client/lib/fastcomments-client/models/get_pending_webhook_events_response.rb index bb63f5a..ee19adf 100644 --- a/client/lib/fastcomments-client/models/get_pending_webhook_events_response.rb +++ b/client/lib/fastcomments-client/models/get_pending_webhook_events_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetPendingWebhookEventsResponse < ApiModelBase + class GetPendingWebhookEventsResponse attr_accessor :status attr_accessor :pending_webhook_events @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_public_feed_posts_response.rb b/client/lib/fastcomments-client/models/get_public_feed_posts_response.rb index 5920959..a225a2c 100644 --- a/client/lib/fastcomments-client/models/get_public_feed_posts_response.rb +++ b/client/lib/fastcomments-client/models/get_public_feed_posts_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetPublicFeedPostsResponse < ApiModelBase + class GetPublicFeedPostsResponse attr_accessor :status attr_accessor :feed_posts @@ -203,6 +203,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -219,6 +274,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_public_pages_response.rb b/client/lib/fastcomments-client/models/get_public_pages_response.rb new file mode 100644 index 0000000..7ba8332 --- /dev/null +++ b/client/lib/fastcomments-client/models/get_public_pages_response.rb @@ -0,0 +1,299 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GetPublicPagesResponse + attr_accessor :next_cursor + + attr_accessor :pages + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'next_cursor' => :'nextCursor', + :'pages' => :'pages', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'next_cursor' => :'String', + :'pages' => :'Array', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'next_cursor', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetPublicPagesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetPublicPagesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + else + self.next_cursor = nil + end + + if attributes.key?(:'pages') + if (value = attributes[:'pages']).is_a?(Array) + self.pages = value + end + else + self.pages = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @pages.nil? + invalid_properties.push('invalid value for "pages", pages cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @pages.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] pages Value to be assigned + def pages=(pages) + if pages.nil? + fail ArgumentError, 'pages cannot be nil' + end + + @pages = pages + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + next_cursor == o.next_cursor && + pages == o.pages && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [next_cursor, pages, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/get_question_config200_response.rb b/client/lib/fastcomments-client/models/get_question_config200_response.rb deleted file mode 100644 index 593bb37..0000000 --- a/client/lib/fastcomments-client/models/get_question_config200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetQuestionConfig200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetQuestionConfigResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_question_config_response.rb b/client/lib/fastcomments-client/models/get_question_config_response.rb index e935df5..3bc1572 100644 --- a/client/lib/fastcomments-client/models/get_question_config_response.rb +++ b/client/lib/fastcomments-client/models/get_question_config_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetQuestionConfigResponse < ApiModelBase + class GetQuestionConfigResponse attr_accessor :status attr_accessor :question_config @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_question_configs200_response.rb b/client/lib/fastcomments-client/models/get_question_configs200_response.rb deleted file mode 100644 index 8885142..0000000 --- a/client/lib/fastcomments-client/models/get_question_configs200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetQuestionConfigs200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetQuestionConfigsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_question_configs_response.rb b/client/lib/fastcomments-client/models/get_question_configs_response.rb index 62f7330..37353a1 100644 --- a/client/lib/fastcomments-client/models/get_question_configs_response.rb +++ b/client/lib/fastcomments-client/models/get_question_configs_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetQuestionConfigsResponse < ApiModelBase + class GetQuestionConfigsResponse attr_accessor :status attr_accessor :question_configs @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_question_result200_response.rb b/client/lib/fastcomments-client/models/get_question_result200_response.rb deleted file mode 100644 index d571ffb..0000000 --- a/client/lib/fastcomments-client/models/get_question_result200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetQuestionResult200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetQuestionResultResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_question_result_response.rb b/client/lib/fastcomments-client/models/get_question_result_response.rb index cc0090f..d0775d1 100644 --- a/client/lib/fastcomments-client/models/get_question_result_response.rb +++ b/client/lib/fastcomments-client/models/get_question_result_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetQuestionResultResponse < ApiModelBase + class GetQuestionResultResponse attr_accessor :status attr_accessor :question_result @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_question_results200_response.rb b/client/lib/fastcomments-client/models/get_question_results200_response.rb deleted file mode 100644 index 83e074f..0000000 --- a/client/lib/fastcomments-client/models/get_question_results200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetQuestionResults200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetQuestionResultsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_question_results_response.rb b/client/lib/fastcomments-client/models/get_question_results_response.rb index b618aeb..331c3c9 100644 --- a/client/lib/fastcomments-client/models/get_question_results_response.rb +++ b/client/lib/fastcomments-client/models/get_question_results_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetQuestionResultsResponse < ApiModelBase + class GetQuestionResultsResponse attr_accessor :status attr_accessor :question_results @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_sso_user_by_email_api_response.rb b/client/lib/fastcomments-client/models/get_sso_user_by_email_api_response.rb index 2431869..65f3444 100644 --- a/client/lib/fastcomments-client/models/get_sso_user_by_email_api_response.rb +++ b/client/lib/fastcomments-client/models/get_sso_user_by_email_api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetSSOUserByEmailAPIResponse < ApiModelBase + class GetSSOUserByEmailAPIResponse attr_accessor :reason attr_accessor :code @@ -170,6 +170,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -186,6 +241,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_sso_user_by_id_api_response.rb b/client/lib/fastcomments-client/models/get_sso_user_by_id_api_response.rb index 9d3236b..63db1b0 100644 --- a/client/lib/fastcomments-client/models/get_sso_user_by_id_api_response.rb +++ b/client/lib/fastcomments-client/models/get_sso_user_by_id_api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetSSOUserByIdAPIResponse < ApiModelBase + class GetSSOUserByIdAPIResponse attr_accessor :reason attr_accessor :code @@ -170,6 +170,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -186,6 +241,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_sso_users200_response.rb b/client/lib/fastcomments-client/models/get_sso_users_response.rb similarity index 68% rename from client/lib/fastcomments-client/models/get_sso_users200_response.rb rename to client/lib/fastcomments-client/models/get_sso_users_response.rb index 5732c45..5841ca9 100644 --- a/client/lib/fastcomments-client/models/get_sso_users200_response.rb +++ b/client/lib/fastcomments-client/models/get_sso_users_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetSSOUsers200Response < ApiModelBase + class GetSSOUsersResponse attr_accessor :users attr_accessor :status @@ -55,14 +55,14 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetSSOUsers200Response` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetSSOUsersResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetSSOUsers200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetSSOUsersResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -171,6 +171,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -187,6 +242,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_subscriptions_api_response.rb b/client/lib/fastcomments-client/models/get_subscriptions_api_response.rb index 32bd2c6..993b6d9 100644 --- a/client/lib/fastcomments-client/models/get_subscriptions_api_response.rb +++ b/client/lib/fastcomments-client/models/get_subscriptions_api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetSubscriptionsAPIResponse < ApiModelBase + class GetSubscriptionsAPIResponse attr_accessor :reason attr_accessor :code @@ -172,6 +172,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -188,6 +243,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_tenant200_response.rb b/client/lib/fastcomments-client/models/get_tenant200_response.rb deleted file mode 100644 index cf141a7..0000000 --- a/client/lib/fastcomments-client/models/get_tenant200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetTenant200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetTenantResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_tenant_daily_usages200_response.rb b/client/lib/fastcomments-client/models/get_tenant_daily_usages200_response.rb deleted file mode 100644 index bf4ad2f..0000000 --- a/client/lib/fastcomments-client/models/get_tenant_daily_usages200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetTenantDailyUsages200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetTenantDailyUsagesResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_tenant_daily_usages_response.rb b/client/lib/fastcomments-client/models/get_tenant_daily_usages_response.rb index e16d8a7..d301465 100644 --- a/client/lib/fastcomments-client/models/get_tenant_daily_usages_response.rb +++ b/client/lib/fastcomments-client/models/get_tenant_daily_usages_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetTenantDailyUsagesResponse < ApiModelBase + class GetTenantDailyUsagesResponse attr_accessor :status attr_accessor :tenant_daily_usages @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_tenant_manual_badges_response.rb b/client/lib/fastcomments-client/models/get_tenant_manual_badges_response.rb new file mode 100644 index 0000000..5709cfb --- /dev/null +++ b/client/lib/fastcomments-client/models/get_tenant_manual_badges_response.rb @@ -0,0 +1,287 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GetTenantManualBadgesResponse + attr_accessor :badges + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'badges' => :'badges', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'badges' => :'Array', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetTenantManualBadgesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetTenantManualBadgesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'badges') + if (value = attributes[:'badges']).is_a?(Array) + self.badges = value + end + else + self.badges = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @badges.nil? + invalid_properties.push('invalid value for "badges", badges cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @badges.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] badges Value to be assigned + def badges=(badges) + if badges.nil? + fail ArgumentError, 'badges cannot be nil' + end + + @badges = badges + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + badges == o.badges && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [badges, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/get_tenant_package200_response.rb b/client/lib/fastcomments-client/models/get_tenant_package200_response.rb deleted file mode 100644 index 856950b..0000000 --- a/client/lib/fastcomments-client/models/get_tenant_package200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetTenantPackage200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetTenantPackageResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_tenant_package_response.rb b/client/lib/fastcomments-client/models/get_tenant_package_response.rb index 81d84a3..491e421 100644 --- a/client/lib/fastcomments-client/models/get_tenant_package_response.rb +++ b/client/lib/fastcomments-client/models/get_tenant_package_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetTenantPackageResponse < ApiModelBase + class GetTenantPackageResponse attr_accessor :status attr_accessor :tenant_package @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_tenant_packages200_response.rb b/client/lib/fastcomments-client/models/get_tenant_packages200_response.rb deleted file mode 100644 index 8486224..0000000 --- a/client/lib/fastcomments-client/models/get_tenant_packages200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetTenantPackages200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetTenantPackagesResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_tenant_packages_response.rb b/client/lib/fastcomments-client/models/get_tenant_packages_response.rb index cf5799e..def384a 100644 --- a/client/lib/fastcomments-client/models/get_tenant_packages_response.rb +++ b/client/lib/fastcomments-client/models/get_tenant_packages_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetTenantPackagesResponse < ApiModelBase + class GetTenantPackagesResponse attr_accessor :status attr_accessor :tenant_packages @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_tenant_response.rb b/client/lib/fastcomments-client/models/get_tenant_response.rb index b7ad707..1ef29a5 100644 --- a/client/lib/fastcomments-client/models/get_tenant_response.rb +++ b/client/lib/fastcomments-client/models/get_tenant_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetTenantResponse < ApiModelBase + class GetTenantResponse attr_accessor :status attr_accessor :tenant @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_tenant_user200_response.rb b/client/lib/fastcomments-client/models/get_tenant_user200_response.rb deleted file mode 100644 index b1ee39c..0000000 --- a/client/lib/fastcomments-client/models/get_tenant_user200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetTenantUser200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetTenantUserResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_tenant_user_response.rb b/client/lib/fastcomments-client/models/get_tenant_user_response.rb index 7b188de..4dc93ba 100644 --- a/client/lib/fastcomments-client/models/get_tenant_user_response.rb +++ b/client/lib/fastcomments-client/models/get_tenant_user_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetTenantUserResponse < ApiModelBase + class GetTenantUserResponse attr_accessor :status attr_accessor :tenant_user @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_tenant_users200_response.rb b/client/lib/fastcomments-client/models/get_tenant_users200_response.rb deleted file mode 100644 index 0218e91..0000000 --- a/client/lib/fastcomments-client/models/get_tenant_users200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetTenantUsers200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetTenantUsersResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_tenant_users_response.rb b/client/lib/fastcomments-client/models/get_tenant_users_response.rb index b561c03..7d4a362 100644 --- a/client/lib/fastcomments-client/models/get_tenant_users_response.rb +++ b/client/lib/fastcomments-client/models/get_tenant_users_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetTenantUsersResponse < ApiModelBase + class GetTenantUsersResponse attr_accessor :status attr_accessor :tenant_users @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_tenants200_response.rb b/client/lib/fastcomments-client/models/get_tenants200_response.rb deleted file mode 100644 index 62c8aeb..0000000 --- a/client/lib/fastcomments-client/models/get_tenants200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetTenants200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetTenantsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_tenants_response.rb b/client/lib/fastcomments-client/models/get_tenants_response.rb index 8eafbf5..7f758ad 100644 --- a/client/lib/fastcomments-client/models/get_tenants_response.rb +++ b/client/lib/fastcomments-client/models/get_tenants_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetTenantsResponse < ApiModelBase + class GetTenantsResponse attr_accessor :status attr_accessor :tenants @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_ticket200_response.rb b/client/lib/fastcomments-client/models/get_ticket200_response.rb deleted file mode 100644 index baf8c83..0000000 --- a/client/lib/fastcomments-client/models/get_ticket200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetTicket200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetTicketResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_ticket_response.rb b/client/lib/fastcomments-client/models/get_ticket_response.rb index e8ae967..635e4a6 100644 --- a/client/lib/fastcomments-client/models/get_ticket_response.rb +++ b/client/lib/fastcomments-client/models/get_ticket_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetTicketResponse < ApiModelBase + class GetTicketResponse attr_accessor :status attr_accessor :ticket @@ -219,6 +219,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -235,6 +290,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_tickets200_response.rb b/client/lib/fastcomments-client/models/get_tickets200_response.rb deleted file mode 100644 index 9313319..0000000 --- a/client/lib/fastcomments-client/models/get_tickets200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetTickets200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetTicketsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_tickets_response.rb b/client/lib/fastcomments-client/models/get_tickets_response.rb index 1069aa6..8c8220b 100644 --- a/client/lib/fastcomments-client/models/get_tickets_response.rb +++ b/client/lib/fastcomments-client/models/get_tickets_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetTicketsResponse < ApiModelBase + class GetTicketsResponse attr_accessor :status attr_accessor :tickets @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_translations_response.rb b/client/lib/fastcomments-client/models/get_translations_response.rb new file mode 100644 index 0000000..5d68015 --- /dev/null +++ b/client/lib/fastcomments-client/models/get_translations_response.rb @@ -0,0 +1,288 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GetTranslationsResponse + # Construct a type with a set of properties K of type T + attr_accessor :translations + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'translations' => :'translations', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'translations' => :'Hash', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetTranslationsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetTranslationsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'translations') + if (value = attributes[:'translations']).is_a?(Hash) + self.translations = value + end + else + self.translations = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @translations.nil? + invalid_properties.push('invalid value for "translations", translations cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @translations.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] translations Value to be assigned + def translations=(translations) + if translations.nil? + fail ArgumentError, 'translations cannot be nil' + end + + @translations = translations + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + translations == o.translations && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [translations, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/get_user200_response.rb b/client/lib/fastcomments-client/models/get_user200_response.rb deleted file mode 100644 index d4edd04..0000000 --- a/client/lib/fastcomments-client/models/get_user200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetUser200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetUserResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_user_badge200_response.rb b/client/lib/fastcomments-client/models/get_user_badge200_response.rb deleted file mode 100644 index e4979e1..0000000 --- a/client/lib/fastcomments-client/models/get_user_badge200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetUserBadge200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'APIGetUserBadgeResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_user_badge_progress_by_id200_response.rb b/client/lib/fastcomments-client/models/get_user_badge_progress_by_id200_response.rb deleted file mode 100644 index cbf63bd..0000000 --- a/client/lib/fastcomments-client/models/get_user_badge_progress_by_id200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetUserBadgeProgressById200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'APIGetUserBadgeProgressResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_user_badge_progress_list200_response.rb b/client/lib/fastcomments-client/models/get_user_badge_progress_list200_response.rb deleted file mode 100644 index 6f7e3e3..0000000 --- a/client/lib/fastcomments-client/models/get_user_badge_progress_list200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetUserBadgeProgressList200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'APIGetUserBadgeProgressListResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_user_badges200_response.rb b/client/lib/fastcomments-client/models/get_user_badges200_response.rb deleted file mode 100644 index cd63c22..0000000 --- a/client/lib/fastcomments-client/models/get_user_badges200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetUserBadges200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'APIGetUserBadgesResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_user_internal_profile_response.rb b/client/lib/fastcomments-client/models/get_user_internal_profile_response.rb new file mode 100644 index 0000000..1f8373a --- /dev/null +++ b/client/lib/fastcomments-client/models/get_user_internal_profile_response.rb @@ -0,0 +1,285 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GetUserInternalProfileResponse + attr_accessor :profile + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'profile' => :'profile', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'profile' => :'GetUserInternalProfileResponseProfile', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetUserInternalProfileResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetUserInternalProfileResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'profile') + self.profile = attributes[:'profile'] + else + self.profile = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @profile.nil? + invalid_properties.push('invalid value for "profile", profile cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @profile.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] profile Value to be assigned + def profile=(profile) + if profile.nil? + fail ArgumentError, 'profile cannot be nil' + end + + @profile = profile + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + profile == o.profile && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [profile, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/get_user_internal_profile_response_profile.rb b/client/lib/fastcomments-client/models/get_user_internal_profile_response_profile.rb new file mode 100644 index 0000000..b53e2b7 --- /dev/null +++ b/client/lib/fastcomments-client/models/get_user_internal_profile_response_profile.rb @@ -0,0 +1,371 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GetUserInternalProfileResponseProfile + attr_accessor :commenter_name + + attr_accessor :first_comment_date + + attr_accessor :ip_hash + + attr_accessor :country_flag + + attr_accessor :country_code + + attr_accessor :website_url + + attr_accessor :bio + + attr_accessor :karma + + attr_accessor :locale + + attr_accessor :verified + + attr_accessor :avatar_src + + attr_accessor :display_name + + attr_accessor :username + + attr_accessor :commenter_email + + attr_accessor :email + + attr_accessor :anon_user_id + + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'commenter_name' => :'commenterName', + :'first_comment_date' => :'firstCommentDate', + :'ip_hash' => :'ipHash', + :'country_flag' => :'countryFlag', + :'country_code' => :'countryCode', + :'website_url' => :'websiteUrl', + :'bio' => :'bio', + :'karma' => :'karma', + :'locale' => :'locale', + :'verified' => :'verified', + :'avatar_src' => :'avatarSrc', + :'display_name' => :'displayName', + :'username' => :'username', + :'commenter_email' => :'commenterEmail', + :'email' => :'email', + :'anon_user_id' => :'anonUserId', + :'user_id' => :'userId' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'commenter_name' => :'String', + :'first_comment_date' => :'Time', + :'ip_hash' => :'String', + :'country_flag' => :'String', + :'country_code' => :'String', + :'website_url' => :'String', + :'bio' => :'String', + :'karma' => :'Float', + :'locale' => :'String', + :'verified' => :'Boolean', + :'avatar_src' => :'String', + :'display_name' => :'String', + :'username' => :'String', + :'commenter_email' => :'String', + :'email' => :'String', + :'anon_user_id' => :'String', + :'user_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'first_comment_date', + :'website_url', + :'avatar_src', + :'commenter_email', + :'email', + :'anon_user_id', + :'user_id' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetUserInternalProfileResponseProfile` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetUserInternalProfileResponseProfile`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'commenter_name') + self.commenter_name = attributes[:'commenter_name'] + end + + if attributes.key?(:'first_comment_date') + self.first_comment_date = attributes[:'first_comment_date'] + end + + if attributes.key?(:'ip_hash') + self.ip_hash = attributes[:'ip_hash'] + end + + if attributes.key?(:'country_flag') + self.country_flag = attributes[:'country_flag'] + end + + if attributes.key?(:'country_code') + self.country_code = attributes[:'country_code'] + end + + if attributes.key?(:'website_url') + self.website_url = attributes[:'website_url'] + end + + if attributes.key?(:'bio') + self.bio = attributes[:'bio'] + end + + if attributes.key?(:'karma') + self.karma = attributes[:'karma'] + end + + if attributes.key?(:'locale') + self.locale = attributes[:'locale'] + end + + if attributes.key?(:'verified') + self.verified = attributes[:'verified'] + end + + if attributes.key?(:'avatar_src') + self.avatar_src = attributes[:'avatar_src'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + + if attributes.key?(:'commenter_email') + self.commenter_email = attributes[:'commenter_email'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'anon_user_id') + self.anon_user_id = attributes[:'anon_user_id'] + end + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + commenter_name == o.commenter_name && + first_comment_date == o.first_comment_date && + ip_hash == o.ip_hash && + country_flag == o.country_flag && + country_code == o.country_code && + website_url == o.website_url && + bio == o.bio && + karma == o.karma && + locale == o.locale && + verified == o.verified && + avatar_src == o.avatar_src && + display_name == o.display_name && + username == o.username && + commenter_email == o.commenter_email && + email == o.email && + anon_user_id == o.anon_user_id && + user_id == o.user_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [commenter_name, first_comment_date, ip_hash, country_flag, country_code, website_url, bio, karma, locale, verified, avatar_src, display_name, username, commenter_email, email, anon_user_id, user_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/get_user_manual_badges_response.rb b/client/lib/fastcomments-client/models/get_user_manual_badges_response.rb new file mode 100644 index 0000000..2024d6f --- /dev/null +++ b/client/lib/fastcomments-client/models/get_user_manual_badges_response.rb @@ -0,0 +1,287 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GetUserManualBadgesResponse + attr_accessor :badges + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'badges' => :'badges', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'badges' => :'Array', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetUserManualBadgesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetUserManualBadgesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'badges') + if (value = attributes[:'badges']).is_a?(Array) + self.badges = value + end + else + self.badges = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @badges.nil? + invalid_properties.push('invalid value for "badges", badges cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @badges.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] badges Value to be assigned + def badges=(badges) + if badges.nil? + fail ArgumentError, 'badges cannot be nil' + end + + @badges = badges + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + badges == o.badges && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [badges, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/get_user_notification_count200_response.rb b/client/lib/fastcomments-client/models/get_user_notification_count200_response.rb deleted file mode 100644 index 19ceff1..0000000 --- a/client/lib/fastcomments-client/models/get_user_notification_count200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetUserNotificationCount200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetUserNotificationCountResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_user_notification_count_response.rb b/client/lib/fastcomments-client/models/get_user_notification_count_response.rb index ce9d187..30f94a5 100644 --- a/client/lib/fastcomments-client/models/get_user_notification_count_response.rb +++ b/client/lib/fastcomments-client/models/get_user_notification_count_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetUserNotificationCountResponse < ApiModelBase + class GetUserNotificationCountResponse attr_accessor :status attr_accessor :count @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_user_notifications200_response.rb b/client/lib/fastcomments-client/models/get_user_notifications200_response.rb deleted file mode 100644 index 47e843f..0000000 --- a/client/lib/fastcomments-client/models/get_user_notifications200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetUserNotifications200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetMyNotificationsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_user_presence_statuses200_response.rb b/client/lib/fastcomments-client/models/get_user_presence_statuses200_response.rb deleted file mode 100644 index 7e3b0ce..0000000 --- a/client/lib/fastcomments-client/models/get_user_presence_statuses200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetUserPresenceStatuses200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetUserPresenceStatusesResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_user_presence_statuses_response.rb b/client/lib/fastcomments-client/models/get_user_presence_statuses_response.rb index a66bdfa..b3314a3 100644 --- a/client/lib/fastcomments-client/models/get_user_presence_statuses_response.rb +++ b/client/lib/fastcomments-client/models/get_user_presence_statuses_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetUserPresenceStatusesResponse < ApiModelBase + class GetUserPresenceStatusesResponse attr_accessor :status # Construct a type with a set of properties K of type T @@ -194,6 +194,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -210,6 +265,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_user_reacts_public200_response.rb b/client/lib/fastcomments-client/models/get_user_reacts_public200_response.rb deleted file mode 100644 index e376f4e..0000000 --- a/client/lib/fastcomments-client/models/get_user_reacts_public200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetUserReactsPublic200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'UserReactsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_user_response.rb b/client/lib/fastcomments-client/models/get_user_response.rb index 7c1dd66..d6050bf 100644 --- a/client/lib/fastcomments-client/models/get_user_response.rb +++ b/client/lib/fastcomments-client/models/get_user_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetUserResponse < ApiModelBase + class GetUserResponse attr_accessor :status attr_accessor :user @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_user_trust_factor_response.rb b/client/lib/fastcomments-client/models/get_user_trust_factor_response.rb new file mode 100644 index 0000000..cd36359 --- /dev/null +++ b/client/lib/fastcomments-client/models/get_user_trust_factor_response.rb @@ -0,0 +1,277 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GetUserTrustFactorResponse + attr_accessor :manual_trust_factor + + attr_accessor :auto_trust_factor + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'manual_trust_factor' => :'manualTrustFactor', + :'auto_trust_factor' => :'autoTrustFactor', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'manual_trust_factor' => :'Float', + :'auto_trust_factor' => :'Float', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetUserTrustFactorResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetUserTrustFactorResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'manual_trust_factor') + self.manual_trust_factor = attributes[:'manual_trust_factor'] + end + + if attributes.key?(:'auto_trust_factor') + self.auto_trust_factor = attributes[:'auto_trust_factor'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + manual_trust_factor == o.manual_trust_factor && + auto_trust_factor == o.auto_trust_factor && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [manual_trust_factor, auto_trust_factor, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/get_v1_page_likes.rb b/client/lib/fastcomments-client/models/get_v1_page_likes.rb new file mode 100644 index 0000000..092e2e3 --- /dev/null +++ b/client/lib/fastcomments-client/models/get_v1_page_likes.rb @@ -0,0 +1,363 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GetV1PageLikes + attr_accessor :url_id_ws + + attr_accessor :did_like + + attr_accessor :comment_count + + attr_accessor :like_count + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'url_id_ws' => :'urlIdWS', + :'did_like' => :'didLike', + :'comment_count' => :'commentCount', + :'like_count' => :'likeCount', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'url_id_ws' => :'String', + :'did_like' => :'Boolean', + :'comment_count' => :'Integer', + :'like_count' => :'Integer', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetV1PageLikes` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetV1PageLikes`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'url_id_ws') + self.url_id_ws = attributes[:'url_id_ws'] + else + self.url_id_ws = nil + end + + if attributes.key?(:'did_like') + self.did_like = attributes[:'did_like'] + else + self.did_like = nil + end + + if attributes.key?(:'comment_count') + self.comment_count = attributes[:'comment_count'] + else + self.comment_count = nil + end + + if attributes.key?(:'like_count') + self.like_count = attributes[:'like_count'] + else + self.like_count = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @url_id_ws.nil? + invalid_properties.push('invalid value for "url_id_ws", url_id_ws cannot be nil.') + end + + if @did_like.nil? + invalid_properties.push('invalid value for "did_like", did_like cannot be nil.') + end + + if @comment_count.nil? + invalid_properties.push('invalid value for "comment_count", comment_count cannot be nil.') + end + + if @like_count.nil? + invalid_properties.push('invalid value for "like_count", like_count cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @url_id_ws.nil? + return false if @did_like.nil? + return false if @comment_count.nil? + return false if @like_count.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] url_id_ws Value to be assigned + def url_id_ws=(url_id_ws) + if url_id_ws.nil? + fail ArgumentError, 'url_id_ws cannot be nil' + end + + @url_id_ws = url_id_ws + end + + # Custom attribute writer method with validation + # @param [Object] did_like Value to be assigned + def did_like=(did_like) + if did_like.nil? + fail ArgumentError, 'did_like cannot be nil' + end + + @did_like = did_like + end + + # Custom attribute writer method with validation + # @param [Object] comment_count Value to be assigned + def comment_count=(comment_count) + if comment_count.nil? + fail ArgumentError, 'comment_count cannot be nil' + end + + @comment_count = comment_count + end + + # Custom attribute writer method with validation + # @param [Object] like_count Value to be assigned + def like_count=(like_count) + if like_count.nil? + fail ArgumentError, 'like_count cannot be nil' + end + + @like_count = like_count + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + url_id_ws == o.url_id_ws && + did_like == o.did_like && + comment_count == o.comment_count && + like_count == o.like_count && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [url_id_ws, did_like, comment_count, like_count, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/get_v2_page_react_users_response.rb b/client/lib/fastcomments-client/models/get_v2_page_react_users_response.rb new file mode 100644 index 0000000..a7cb7ff --- /dev/null +++ b/client/lib/fastcomments-client/models/get_v2_page_react_users_response.rb @@ -0,0 +1,287 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GetV2PageReactUsersResponse + attr_accessor :user_names + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_names' => :'userNames', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_names' => :'Array', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetV2PageReactUsersResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetV2PageReactUsersResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_names') + if (value = attributes[:'user_names']).is_a?(Array) + self.user_names = value + end + else + self.user_names = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @user_names.nil? + invalid_properties.push('invalid value for "user_names", user_names cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @user_names.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] user_names Value to be assigned + def user_names=(user_names) + if user_names.nil? + fail ArgumentError, 'user_names cannot be nil' + end + + @user_names = user_names + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_names == o.user_names && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_names, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/get_v2_page_reacts.rb b/client/lib/fastcomments-client/models/get_v2_page_reacts.rb new file mode 100644 index 0000000..fc4e99c --- /dev/null +++ b/client/lib/fastcomments-client/models/get_v2_page_reacts.rb @@ -0,0 +1,282 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GetV2PageReacts + attr_accessor :reacted_ids + + # Construct a type with a set of properties K of type T + attr_accessor :counts + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reacted_ids' => :'reactedIds', + :'counts' => :'counts', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'reacted_ids' => :'Array', + :'counts' => :'Hash', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GetV2PageReacts` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GetV2PageReacts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'reacted_ids') + if (value = attributes[:'reacted_ids']).is_a?(Array) + self.reacted_ids = value + end + end + + if attributes.key?(:'counts') + if (value = attributes[:'counts']).is_a?(Hash) + self.counts = value + end + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + reacted_ids == o.reacted_ids && + counts == o.counts && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [reacted_ids, counts, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/get_votes200_response.rb b/client/lib/fastcomments-client/models/get_votes200_response.rb deleted file mode 100644 index b8be49d..0000000 --- a/client/lib/fastcomments-client/models/get_votes200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetVotes200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetVotesResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_votes_for_user200_response.rb b/client/lib/fastcomments-client/models/get_votes_for_user200_response.rb deleted file mode 100644 index ad03875..0000000 --- a/client/lib/fastcomments-client/models/get_votes_for_user200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module GetVotesForUser200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'GetVotesForUserResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/get_votes_for_user_response.rb b/client/lib/fastcomments-client/models/get_votes_for_user_response.rb index 27cc175..8a1a24a 100644 --- a/client/lib/fastcomments-client/models/get_votes_for_user_response.rb +++ b/client/lib/fastcomments-client/models/get_votes_for_user_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetVotesForUserResponse < ApiModelBase + class GetVotesForUserResponse attr_accessor :status attr_accessor :applied_authorized_votes @@ -249,6 +249,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -265,6 +320,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/get_votes_response.rb b/client/lib/fastcomments-client/models/get_votes_response.rb index b77b033..68a0ab8 100644 --- a/client/lib/fastcomments-client/models/get_votes_response.rb +++ b/client/lib/fastcomments-client/models/get_votes_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class GetVotesResponse < ApiModelBase + class GetVotesResponse attr_accessor :status attr_accessor :applied_authorized_votes @@ -249,6 +249,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -265,6 +320,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/gif_get_large_response.rb b/client/lib/fastcomments-client/models/gif_get_large_response.rb new file mode 100644 index 0000000..35711fa --- /dev/null +++ b/client/lib/fastcomments-client/models/gif_get_large_response.rb @@ -0,0 +1,285 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GifGetLargeResponse + attr_accessor :src + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'src' => :'src', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'src' => :'String', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GifGetLargeResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GifGetLargeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'src') + self.src = attributes[:'src'] + else + self.src = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @src.nil? + invalid_properties.push('invalid value for "src", src cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @src.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] src Value to be assigned + def src=(src) + if src.nil? + fail ArgumentError, 'src cannot be nil' + end + + @src = src + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + src == o.src && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [src, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/gif_rating.rb b/client/lib/fastcomments-client/models/gif_rating.rb index f8bbb79..98a9eaf 100644 --- a/client/lib/fastcomments-client/models/gif_rating.rb +++ b/client/lib/fastcomments-client/models/gif_rating.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/gif_search_internal_error.rb b/client/lib/fastcomments-client/models/gif_search_internal_error.rb new file mode 100644 index 0000000..aa1e4b7 --- /dev/null +++ b/client/lib/fastcomments-client/models/gif_search_internal_error.rb @@ -0,0 +1,285 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GifSearchInternalError + attr_accessor :code + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'String', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GifSearchInternalError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GifSearchInternalError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + else + self.code = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @code.nil? + invalid_properties.push('invalid value for "code", code cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @code.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if code.nil? + fail ArgumentError, 'code cannot be nil' + end + + @code = code + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/gif_search_response.rb b/client/lib/fastcomments-client/models/gif_search_response.rb new file mode 100644 index 0000000..e47f761 --- /dev/null +++ b/client/lib/fastcomments-client/models/gif_search_response.rb @@ -0,0 +1,287 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class GifSearchResponse + attr_accessor :images + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'images' => :'images', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'images' => :'Array>', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::GifSearchResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::GifSearchResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'images') + if (value = attributes[:'images']).is_a?(Array) + self.images = value + end + else + self.images = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @images.nil? + invalid_properties.push('invalid value for "images", images cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @images.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] images Value to be assigned + def images=(images) + if images.nil? + fail ArgumentError, 'images cannot be nil' + end + + @images = images + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + images == o.images && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [images, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/block_from_comment_public200_response.rb b/client/lib/fastcomments-client/models/gif_search_response_images_inner_inner.rb similarity index 94% rename from client/lib/fastcomments-client/models/block_from_comment_public200_response.rb rename to client/lib/fastcomments-client/models/gif_search_response_images_inner_inner.rb index c41ecb1..14c33aa 100644 --- a/client/lib/fastcomments-client/models/block_from_comment_public200_response.rb +++ b/client/lib/fastcomments-client/models/gif_search_response_images_inner_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,13 +14,13 @@ require 'time' module FastCommentsClient - module BlockFromCommentPublic200Response + module GifSearchResponseImagesInnerInner class << self # List of class defined in anyOf (OpenAPI v3) def openapi_any_of [ - :'APIError', - :'BlockSuccess' + :'Float', + :'String' ] end @@ -37,7 +37,8 @@ def build(data) openapi_any_of.each do |klass| begin next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data rescue # rescue all errors so we keep iterating even if the current item lookup raises end end diff --git a/client/lib/fastcomments-client/models/header_account_notification.rb b/client/lib/fastcomments-client/models/header_account_notification.rb index 460f20c..0c58ab0 100644 --- a/client/lib/fastcomments-client/models/header_account_notification.rb +++ b/client/lib/fastcomments-client/models/header_account_notification.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class HeaderAccountNotification < ApiModelBase + class HeaderAccountNotification attr_accessor :_id attr_accessor :title @@ -35,6 +35,9 @@ class HeaderAccountNotification < ApiModelBase attr_accessor :created_at + # Discriminator for notifications with a special layout/click handler (e.g. \"feedback-offer\"). + attr_accessor :type + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -46,7 +49,8 @@ def self.attribute_map :'severity' => :'severity', :'link_url' => :'linkUrl', :'link_text' => :'linkText', - :'created_at' => :'createdAt' + :'created_at' => :'createdAt', + :'type' => :'type' } end @@ -71,7 +75,8 @@ def self.openapi_types :'severity' => :'String', :'link_url' => :'String', :'link_text' => :'String', - :'created_at' => :'Time' + :'created_at' => :'Time', + :'type' => :'String' } end @@ -82,6 +87,7 @@ def self.openapi_nullable :'dates', :'link_url', :'link_text', + :'type' ]) end @@ -158,6 +164,10 @@ def initialize(attributes = {}) else self.created_at = nil end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -263,7 +273,8 @@ def ==(o) severity == o.severity && link_url == o.link_url && link_text == o.link_text && - created_at == o.created_at + created_at == o.created_at && + type == o.type end # @see the `==` method @@ -275,7 +286,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [_id, title, message, messages_by_locale, dates, severity, link_url, link_text, created_at].hash + [_id, title, message, messages_by_locale, dates, severity, link_url, link_text, created_at, type].hash end # Builds the object from hash @@ -301,6 +312,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -317,6 +383,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/header_state.rb b/client/lib/fastcomments-client/models/header_state.rb index 6d30223..da3137a 100644 --- a/client/lib/fastcomments-client/models/header_state.rb +++ b/client/lib/fastcomments-client/models/header_state.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class HeaderState < ApiModelBase + class HeaderState attr_accessor :status attr_accessor :notification_type @@ -299,6 +299,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -315,6 +370,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/ignored_response.rb b/client/lib/fastcomments-client/models/ignored_response.rb index 15ed974..e7c5837 100644 --- a/client/lib/fastcomments-client/models/ignored_response.rb +++ b/client/lib/fastcomments-client/models/ignored_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class IgnoredResponse < ApiModelBase + class IgnoredResponse attr_accessor :status attr_accessor :note @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/image_content_profanity_level.rb b/client/lib/fastcomments-client/models/image_content_profanity_level.rb index ad38283..d0573b5 100644 --- a/client/lib/fastcomments-client/models/image_content_profanity_level.rb +++ b/client/lib/fastcomments-client/models/image_content_profanity_level.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/imported_agent_approval_notification_frequency.rb b/client/lib/fastcomments-client/models/imported_agent_approval_notification_frequency.rb new file mode 100644 index 0000000..6f778b4 --- /dev/null +++ b/client/lib/fastcomments-client/models/imported_agent_approval_notification_frequency.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ImportedAgentApprovalNotificationFrequency + NMINUS_1 = -1.freeze + N0 = 0.freeze + N1 = 1.freeze + N2 = 2.freeze + + def self.all_vars + @all_vars ||= [NMINUS_1, N0, N1, N2].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if ImportedAgentApprovalNotificationFrequency.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #ImportedAgentApprovalNotificationFrequency" + end + end +end diff --git a/client/lib/fastcomments-client/models/imported_site_type.rb b/client/lib/fastcomments-client/models/imported_site_type.rb index 1cc8773..34240ce 100644 --- a/client/lib/fastcomments-client/models/imported_site_type.rb +++ b/client/lib/fastcomments-client/models/imported_site_type.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/live_event.rb b/client/lib/fastcomments-client/models/live_event.rb index 96ac459..24a4324 100644 --- a/client/lib/fastcomments-client/models/live_event.rb +++ b/client/lib/fastcomments-client/models/live_event.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class LiveEvent < ApiModelBase + class LiveEvent attr_accessor :type attr_accessor :timestamp @@ -45,6 +45,8 @@ class LiveEvent < ApiModelBase attr_accessor :ul + attr_accessor :sc + attr_accessor :changes class EnumAttributeValidator @@ -87,6 +89,7 @@ def self.attribute_map :'is_closed' => :'isClosed', :'uj' => :'uj', :'ul' => :'ul', + :'sc' => :'sc', :'changes' => :'changes' } end @@ -119,6 +122,7 @@ def self.openapi_types :'is_closed' => :'Boolean', :'uj' => :'Array', :'ul' => :'Array', + :'sc' => :'Integer', :'changes' => :'Hash' } end @@ -213,6 +217,10 @@ def initialize(attributes = {}) end end + if attributes.key?(:'sc') + self.sc = attributes[:'sc'] + end + if attributes.key?(:'changes') if (value = attributes[:'changes']).is_a?(Hash) self.changes = value @@ -270,6 +278,7 @@ def ==(o) is_closed == o.is_closed && uj == o.uj && ul == o.ul && + sc == o.sc && changes == o.changes end @@ -282,7 +291,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp, ts, broadcast_id, user_id, badges, notification, vote, comment, feed_post, extra_info, config, is_closed, uj, ul, changes].hash + [type, timestamp, ts, broadcast_id, user_id, badges, notification, vote, comment, feed_post, extra_info, config, is_closed, uj, ul, sc, changes].hash end # Builds the object from hash @@ -308,6 +317,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -324,6 +388,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/live_event_extra_info.rb b/client/lib/fastcomments-client/models/live_event_extra_info.rb index 19b9616..9ff09d0 100644 --- a/client/lib/fastcomments-client/models/live_event_extra_info.rb +++ b/client/lib/fastcomments-client/models/live_event_extra_info.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class LiveEventExtraInfo < ApiModelBase + class LiveEventExtraInfo # Construct a type with a set of properties K of type T attr_accessor :comment_positions @@ -129,6 +129,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -145,6 +200,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/live_event_type.rb b/client/lib/fastcomments-client/models/live_event_type.rb index 207c899..401d1e1 100644 --- a/client/lib/fastcomments-client/models/live_event_type.rb +++ b/client/lib/fastcomments-client/models/live_event_type.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -32,9 +32,15 @@ class LiveEventType NEW_FEED_POST = "new-feed-post".freeze UPDATED_FEED_POST = "updated-feed-post".freeze DELETED_FEED_POST = "deleted-feed-post".freeze + NEW_TICKET = "new-ticket".freeze + UPDATED_TICKET_STATE = "updated-ticket-state".freeze + UPDATED_TICKET_ASSIGNMENT = "updated-ticket-assignment".freeze + DELETED_TICKET = "deleted-ticket".freeze + PAGE_REACT = "page-react".freeze + QUESTION_RESULT = "question-result".freeze def self.all_vars - @all_vars ||= [UPDATE_BADGES, NOTIFICATION, NOTIFICATION_UPDATE, P_U, NEW_VOTE, DELETED_VOTE, NEW_COMMENT, UPDATED_COMMENT, DELETED_COMMENT, CVC, NEW_CONFIG, THREAD_STATE_CHANGE, FR, DFR, NEW_FEED_POST, UPDATED_FEED_POST, DELETED_FEED_POST].freeze + @all_vars ||= [UPDATE_BADGES, NOTIFICATION, NOTIFICATION_UPDATE, P_U, NEW_VOTE, DELETED_VOTE, NEW_COMMENT, UPDATED_COMMENT, DELETED_COMMENT, CVC, NEW_CONFIG, THREAD_STATE_CHANGE, FR, DFR, NEW_FEED_POST, UPDATED_FEED_POST, DELETED_FEED_POST, NEW_TICKET, UPDATED_TICKET_STATE, UPDATED_TICKET_ASSIGNMENT, DELETED_TICKET, PAGE_REACT, QUESTION_RESULT].freeze end # Builds the enum from string diff --git a/client/lib/fastcomments-client/models/lock_comment200_response.rb b/client/lib/fastcomments-client/models/lock_comment200_response.rb deleted file mode 100644 index 8c330c9..0000000 --- a/client/lib/fastcomments-client/models/lock_comment200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module LockComment200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIEmptyResponse', - :'APIError' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/media_asset.rb b/client/lib/fastcomments-client/models/media_asset.rb index 9e974fe..b817d3a 100644 --- a/client/lib/fastcomments-client/models/media_asset.rb +++ b/client/lib/fastcomments-client/models/media_asset.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class MediaAsset < ApiModelBase + class MediaAsset attr_accessor :w attr_accessor :h @@ -195,6 +195,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -211,6 +266,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/mention_auto_complete_mode.rb b/client/lib/fastcomments-client/models/mention_auto_complete_mode.rb index 55db362..1a1d914 100644 --- a/client/lib/fastcomments-client/models/mention_auto_complete_mode.rb +++ b/client/lib/fastcomments-client/models/mention_auto_complete_mode.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/meta_item.rb b/client/lib/fastcomments-client/models/meta_item.rb index 6d6fad1..8b02b95 100644 --- a/client/lib/fastcomments-client/models/meta_item.rb +++ b/client/lib/fastcomments-client/models/meta_item.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class MetaItem < ApiModelBase + class MetaItem attr_accessor :name attr_accessor :values @@ -171,6 +171,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -187,6 +242,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/moderation_api_child_comments_response.rb b/client/lib/fastcomments-client/models/moderation_api_child_comments_response.rb new file mode 100644 index 0000000..9a24dfa --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_api_child_comments_response.rb @@ -0,0 +1,287 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationAPIChildCommentsResponse + attr_accessor :comments + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'comments' => :'comments', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'comments' => :'Array', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationAPIChildCommentsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationAPIChildCommentsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'comments') + if (value = attributes[:'comments']).is_a?(Array) + self.comments = value + end + else + self.comments = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @comments.nil? + invalid_properties.push('invalid value for "comments", comments cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @comments.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] comments Value to be assigned + def comments=(comments) + if comments.nil? + fail ArgumentError, 'comments cannot be nil' + end + + @comments = comments + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + comments == o.comments && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [comments, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_api_comment.rb b/client/lib/fastcomments-client/models/moderation_api_comment.rb new file mode 100644 index 0000000..ca1b435 --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_api_comment.rb @@ -0,0 +1,753 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationAPIComment + attr_accessor :is_local_deleted + + attr_accessor :reply_count + + attr_accessor :feedback_results + + attr_accessor :is_voted_up + + attr_accessor :is_voted_down + + attr_accessor :my_vote_id + + attr_accessor :_id + + attr_accessor :tenant_id + + attr_accessor :url_id + + attr_accessor :url + + attr_accessor :page_title + + attr_accessor :user_id + + attr_accessor :anon_user_id + + attr_accessor :commenter_name + + attr_accessor :commenter_link + + attr_accessor :comment_html + + attr_accessor :parent_id + + attr_accessor :date + + attr_accessor :local_date_string + + attr_accessor :votes + + attr_accessor :votes_up + + attr_accessor :votes_down + + attr_accessor :expire_at + + attr_accessor :reviewed + + attr_accessor :avatar_src + + attr_accessor :is_spam + + attr_accessor :perm_not_spam + + attr_accessor :has_links + + attr_accessor :has_code + + attr_accessor :approved + + attr_accessor :locale + + attr_accessor :is_banned_user + + attr_accessor :is_by_admin + + attr_accessor :is_by_moderator + + attr_accessor :is_pinned + + attr_accessor :is_locked + + attr_accessor :flag_count + + attr_accessor :display_label + + attr_accessor :badges + + attr_accessor :verified + + attr_accessor :feedback_ids + + attr_accessor :is_deleted + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'is_local_deleted' => :'isLocalDeleted', + :'reply_count' => :'replyCount', + :'feedback_results' => :'feedbackResults', + :'is_voted_up' => :'isVotedUp', + :'is_voted_down' => :'isVotedDown', + :'my_vote_id' => :'myVoteId', + :'_id' => :'_id', + :'tenant_id' => :'tenantId', + :'url_id' => :'urlId', + :'url' => :'url', + :'page_title' => :'pageTitle', + :'user_id' => :'userId', + :'anon_user_id' => :'anonUserId', + :'commenter_name' => :'commenterName', + :'commenter_link' => :'commenterLink', + :'comment_html' => :'commentHTML', + :'parent_id' => :'parentId', + :'date' => :'date', + :'local_date_string' => :'localDateString', + :'votes' => :'votes', + :'votes_up' => :'votesUp', + :'votes_down' => :'votesDown', + :'expire_at' => :'expireAt', + :'reviewed' => :'reviewed', + :'avatar_src' => :'avatarSrc', + :'is_spam' => :'isSpam', + :'perm_not_spam' => :'permNotSpam', + :'has_links' => :'hasLinks', + :'has_code' => :'hasCode', + :'approved' => :'approved', + :'locale' => :'locale', + :'is_banned_user' => :'isBannedUser', + :'is_by_admin' => :'isByAdmin', + :'is_by_moderator' => :'isByModerator', + :'is_pinned' => :'isPinned', + :'is_locked' => :'isLocked', + :'flag_count' => :'flagCount', + :'display_label' => :'displayLabel', + :'badges' => :'badges', + :'verified' => :'verified', + :'feedback_ids' => :'feedbackIds', + :'is_deleted' => :'isDeleted' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'is_local_deleted' => :'Boolean', + :'reply_count' => :'Float', + :'feedback_results' => :'Array', + :'is_voted_up' => :'Boolean', + :'is_voted_down' => :'Boolean', + :'my_vote_id' => :'String', + :'_id' => :'String', + :'tenant_id' => :'String', + :'url_id' => :'String', + :'url' => :'String', + :'page_title' => :'String', + :'user_id' => :'String', + :'anon_user_id' => :'String', + :'commenter_name' => :'String', + :'commenter_link' => :'String', + :'comment_html' => :'String', + :'parent_id' => :'String', + :'date' => :'Time', + :'local_date_string' => :'String', + :'votes' => :'Float', + :'votes_up' => :'Float', + :'votes_down' => :'Float', + :'expire_at' => :'Time', + :'reviewed' => :'Boolean', + :'avatar_src' => :'String', + :'is_spam' => :'Boolean', + :'perm_not_spam' => :'Boolean', + :'has_links' => :'Boolean', + :'has_code' => :'Boolean', + :'approved' => :'Boolean', + :'locale' => :'String', + :'is_banned_user' => :'Boolean', + :'is_by_admin' => :'Boolean', + :'is_by_moderator' => :'Boolean', + :'is_pinned' => :'Boolean', + :'is_locked' => :'Boolean', + :'flag_count' => :'Float', + :'display_label' => :'String', + :'badges' => :'Array', + :'verified' => :'Boolean', + :'feedback_ids' => :'Array', + :'is_deleted' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'page_title', + :'user_id', + :'anon_user_id', + :'commenter_link', + :'parent_id', + :'date', + :'local_date_string', + :'votes', + :'votes_up', + :'votes_down', + :'expire_at', + :'avatar_src', + :'locale', + :'is_pinned', + :'is_locked', + :'flag_count', + :'display_label', + :'badges', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationAPIComment` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationAPIComment`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'is_local_deleted') + self.is_local_deleted = attributes[:'is_local_deleted'] + end + + if attributes.key?(:'reply_count') + self.reply_count = attributes[:'reply_count'] + end + + if attributes.key?(:'feedback_results') + if (value = attributes[:'feedback_results']).is_a?(Array) + self.feedback_results = value + end + end + + if attributes.key?(:'is_voted_up') + self.is_voted_up = attributes[:'is_voted_up'] + end + + if attributes.key?(:'is_voted_down') + self.is_voted_down = attributes[:'is_voted_down'] + end + + if attributes.key?(:'my_vote_id') + self.my_vote_id = attributes[:'my_vote_id'] + end + + if attributes.key?(:'_id') + self._id = attributes[:'_id'] + else + self._id = nil + end + + if attributes.key?(:'tenant_id') + self.tenant_id = attributes[:'tenant_id'] + else + self.tenant_id = nil + end + + if attributes.key?(:'url_id') + self.url_id = attributes[:'url_id'] + else + self.url_id = nil + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + else + self.url = nil + end + + if attributes.key?(:'page_title') + self.page_title = attributes[:'page_title'] + end + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'anon_user_id') + self.anon_user_id = attributes[:'anon_user_id'] + end + + if attributes.key?(:'commenter_name') + self.commenter_name = attributes[:'commenter_name'] + else + self.commenter_name = nil + end + + if attributes.key?(:'commenter_link') + self.commenter_link = attributes[:'commenter_link'] + end + + if attributes.key?(:'comment_html') + self.comment_html = attributes[:'comment_html'] + else + self.comment_html = nil + end + + if attributes.key?(:'parent_id') + self.parent_id = attributes[:'parent_id'] + end + + if attributes.key?(:'date') + self.date = attributes[:'date'] + else + self.date = nil + end + + if attributes.key?(:'local_date_string') + self.local_date_string = attributes[:'local_date_string'] + end + + if attributes.key?(:'votes') + self.votes = attributes[:'votes'] + end + + if attributes.key?(:'votes_up') + self.votes_up = attributes[:'votes_up'] + end + + if attributes.key?(:'votes_down') + self.votes_down = attributes[:'votes_down'] + end + + if attributes.key?(:'expire_at') + self.expire_at = attributes[:'expire_at'] + end + + if attributes.key?(:'reviewed') + self.reviewed = attributes[:'reviewed'] + end + + if attributes.key?(:'avatar_src') + self.avatar_src = attributes[:'avatar_src'] + end + + if attributes.key?(:'is_spam') + self.is_spam = attributes[:'is_spam'] + end + + if attributes.key?(:'perm_not_spam') + self.perm_not_spam = attributes[:'perm_not_spam'] + end + + if attributes.key?(:'has_links') + self.has_links = attributes[:'has_links'] + end + + if attributes.key?(:'has_code') + self.has_code = attributes[:'has_code'] + end + + if attributes.key?(:'approved') + self.approved = attributes[:'approved'] + else + self.approved = nil + end + + if attributes.key?(:'locale') + self.locale = attributes[:'locale'] + else + self.locale = nil + end + + if attributes.key?(:'is_banned_user') + self.is_banned_user = attributes[:'is_banned_user'] + end + + if attributes.key?(:'is_by_admin') + self.is_by_admin = attributes[:'is_by_admin'] + end + + if attributes.key?(:'is_by_moderator') + self.is_by_moderator = attributes[:'is_by_moderator'] + end + + if attributes.key?(:'is_pinned') + self.is_pinned = attributes[:'is_pinned'] + end + + if attributes.key?(:'is_locked') + self.is_locked = attributes[:'is_locked'] + end + + if attributes.key?(:'flag_count') + self.flag_count = attributes[:'flag_count'] + end + + if attributes.key?(:'display_label') + self.display_label = attributes[:'display_label'] + end + + if attributes.key?(:'badges') + if (value = attributes[:'badges']).is_a?(Array) + self.badges = value + end + end + + if attributes.key?(:'verified') + self.verified = attributes[:'verified'] + else + self.verified = nil + end + + if attributes.key?(:'feedback_ids') + if (value = attributes[:'feedback_ids']).is_a?(Array) + self.feedback_ids = value + end + end + + if attributes.key?(:'is_deleted') + self.is_deleted = attributes[:'is_deleted'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @_id.nil? + invalid_properties.push('invalid value for "_id", _id cannot be nil.') + end + + if @tenant_id.nil? + invalid_properties.push('invalid value for "tenant_id", tenant_id cannot be nil.') + end + + if @url_id.nil? + invalid_properties.push('invalid value for "url_id", url_id cannot be nil.') + end + + if @url.nil? + invalid_properties.push('invalid value for "url", url cannot be nil.') + end + + if @commenter_name.nil? + invalid_properties.push('invalid value for "commenter_name", commenter_name cannot be nil.') + end + + if @comment_html.nil? + invalid_properties.push('invalid value for "comment_html", comment_html cannot be nil.') + end + + if @approved.nil? + invalid_properties.push('invalid value for "approved", approved cannot be nil.') + end + + if @verified.nil? + invalid_properties.push('invalid value for "verified", verified cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @_id.nil? + return false if @tenant_id.nil? + return false if @url_id.nil? + return false if @url.nil? + return false if @commenter_name.nil? + return false if @comment_html.nil? + return false if @approved.nil? + return false if @verified.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] _id Value to be assigned + def _id=(_id) + if _id.nil? + fail ArgumentError, '_id cannot be nil' + end + + @_id = _id + end + + # Custom attribute writer method with validation + # @param [Object] tenant_id Value to be assigned + def tenant_id=(tenant_id) + if tenant_id.nil? + fail ArgumentError, 'tenant_id cannot be nil' + end + + @tenant_id = tenant_id + end + + # Custom attribute writer method with validation + # @param [Object] url_id Value to be assigned + def url_id=(url_id) + if url_id.nil? + fail ArgumentError, 'url_id cannot be nil' + end + + @url_id = url_id + end + + # Custom attribute writer method with validation + # @param [Object] url Value to be assigned + def url=(url) + if url.nil? + fail ArgumentError, 'url cannot be nil' + end + + @url = url + end + + # Custom attribute writer method with validation + # @param [Object] commenter_name Value to be assigned + def commenter_name=(commenter_name) + if commenter_name.nil? + fail ArgumentError, 'commenter_name cannot be nil' + end + + @commenter_name = commenter_name + end + + # Custom attribute writer method with validation + # @param [Object] comment_html Value to be assigned + def comment_html=(comment_html) + if comment_html.nil? + fail ArgumentError, 'comment_html cannot be nil' + end + + @comment_html = comment_html + end + + # Custom attribute writer method with validation + # @param [Object] approved Value to be assigned + def approved=(approved) + if approved.nil? + fail ArgumentError, 'approved cannot be nil' + end + + @approved = approved + end + + # Custom attribute writer method with validation + # @param [Object] verified Value to be assigned + def verified=(verified) + if verified.nil? + fail ArgumentError, 'verified cannot be nil' + end + + @verified = verified + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + is_local_deleted == o.is_local_deleted && + reply_count == o.reply_count && + feedback_results == o.feedback_results && + is_voted_up == o.is_voted_up && + is_voted_down == o.is_voted_down && + my_vote_id == o.my_vote_id && + _id == o._id && + tenant_id == o.tenant_id && + url_id == o.url_id && + url == o.url && + page_title == o.page_title && + user_id == o.user_id && + anon_user_id == o.anon_user_id && + commenter_name == o.commenter_name && + commenter_link == o.commenter_link && + comment_html == o.comment_html && + parent_id == o.parent_id && + date == o.date && + local_date_string == o.local_date_string && + votes == o.votes && + votes_up == o.votes_up && + votes_down == o.votes_down && + expire_at == o.expire_at && + reviewed == o.reviewed && + avatar_src == o.avatar_src && + is_spam == o.is_spam && + perm_not_spam == o.perm_not_spam && + has_links == o.has_links && + has_code == o.has_code && + approved == o.approved && + locale == o.locale && + is_banned_user == o.is_banned_user && + is_by_admin == o.is_by_admin && + is_by_moderator == o.is_by_moderator && + is_pinned == o.is_pinned && + is_locked == o.is_locked && + flag_count == o.flag_count && + display_label == o.display_label && + badges == o.badges && + verified == o.verified && + feedback_ids == o.feedback_ids && + is_deleted == o.is_deleted + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [is_local_deleted, reply_count, feedback_results, is_voted_up, is_voted_down, my_vote_id, _id, tenant_id, url_id, url, page_title, user_id, anon_user_id, commenter_name, commenter_link, comment_html, parent_id, date, local_date_string, votes, votes_up, votes_down, expire_at, reviewed, avatar_src, is_spam, perm_not_spam, has_links, has_code, approved, locale, is_banned_user, is_by_admin, is_by_moderator, is_pinned, is_locked, flag_count, display_label, badges, verified, feedback_ids, is_deleted].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_api_comment_log.rb b/client/lib/fastcomments-client/models/moderation_api_comment_log.rb new file mode 100644 index 0000000..52ad38c --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_api_comment_log.rb @@ -0,0 +1,298 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationAPICommentLog + attr_accessor :date + + attr_accessor :username + + attr_accessor :action_name + + attr_accessor :message_html + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'date' => :'date', + :'username' => :'username', + :'action_name' => :'actionName', + :'message_html' => :'messageHTML' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'date' => :'Time', + :'username' => :'String', + :'action_name' => :'String', + :'message_html' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationAPICommentLog` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationAPICommentLog`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'date') + self.date = attributes[:'date'] + else + self.date = nil + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + + if attributes.key?(:'action_name') + self.action_name = attributes[:'action_name'] + else + self.action_name = nil + end + + if attributes.key?(:'message_html') + self.message_html = attributes[:'message_html'] + else + self.message_html = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @date.nil? + invalid_properties.push('invalid value for "date", date cannot be nil.') + end + + if @action_name.nil? + invalid_properties.push('invalid value for "action_name", action_name cannot be nil.') + end + + if @message_html.nil? + invalid_properties.push('invalid value for "message_html", message_html cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @date.nil? + return false if @action_name.nil? + return false if @message_html.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] date Value to be assigned + def date=(date) + if date.nil? + fail ArgumentError, 'date cannot be nil' + end + + @date = date + end + + # Custom attribute writer method with validation + # @param [Object] action_name Value to be assigned + def action_name=(action_name) + if action_name.nil? + fail ArgumentError, 'action_name cannot be nil' + end + + @action_name = action_name + end + + # Custom attribute writer method with validation + # @param [Object] message_html Value to be assigned + def message_html=(message_html) + if message_html.nil? + fail ArgumentError, 'message_html cannot be nil' + end + + @message_html = message_html + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + date == o.date && + username == o.username && + action_name == o.action_name && + message_html == o.message_html + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [date, username, action_name, message_html].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_api_comment_response.rb b/client/lib/fastcomments-client/models/moderation_api_comment_response.rb new file mode 100644 index 0000000..8d39eaa --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_api_comment_response.rb @@ -0,0 +1,285 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationAPICommentResponse + attr_accessor :comment + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'comment' => :'comment', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'comment' => :'ModerationAPIComment', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationAPICommentResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationAPICommentResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'comment') + self.comment = attributes[:'comment'] + else + self.comment = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @comment.nil? + invalid_properties.push('invalid value for "comment", comment cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @comment.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] comment Value to be assigned + def comment=(comment) + if comment.nil? + fail ArgumentError, 'comment cannot be nil' + end + + @comment = comment + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + comment == o.comment && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [comment, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_api_count_comments_response.rb b/client/lib/fastcomments-client/models/moderation_api_count_comments_response.rb new file mode 100644 index 0000000..30f70a3 --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_api_count_comments_response.rb @@ -0,0 +1,285 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationAPICountCommentsResponse + attr_accessor :status + + attr_accessor :count + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'count' => :'count' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'APIStatus', + :'count' => :'Float' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationAPICountCommentsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationAPICountCommentsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'count') + self.count = attributes[:'count'] + else + self.count = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @count.nil? + invalid_properties.push('invalid value for "count", count cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + return false if @count.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] count Value to be assigned + def count=(count) + if count.nil? + fail ArgumentError, 'count cannot be nil' + end + + @count = count + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + count == o.count + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, count].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_api_get_comment_ids_response.rb b/client/lib/fastcomments-client/models/moderation_api_get_comment_ids_response.rb new file mode 100644 index 0000000..f59856f --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_api_get_comment_ids_response.rb @@ -0,0 +1,313 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationAPIGetCommentIdsResponse + attr_accessor :ids + + attr_accessor :has_more + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ids' => :'ids', + :'has_more' => :'hasMore', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ids' => :'Array', + :'has_more' => :'Boolean', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationAPIGetCommentIdsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationAPIGetCommentIdsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ids') + if (value = attributes[:'ids']).is_a?(Array) + self.ids = value + end + else + self.ids = nil + end + + if attributes.key?(:'has_more') + self.has_more = attributes[:'has_more'] + else + self.has_more = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @ids.nil? + invalid_properties.push('invalid value for "ids", ids cannot be nil.') + end + + if @has_more.nil? + invalid_properties.push('invalid value for "has_more", has_more cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @ids.nil? + return false if @has_more.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] ids Value to be assigned + def ids=(ids) + if ids.nil? + fail ArgumentError, 'ids cannot be nil' + end + + @ids = ids + end + + # Custom attribute writer method with validation + # @param [Object] has_more Value to be assigned + def has_more=(has_more) + if has_more.nil? + fail ArgumentError, 'has_more cannot be nil' + end + + @has_more = has_more + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ids == o.ids && + has_more == o.has_more && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ids, has_more, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_api_get_comments_response.rb b/client/lib/fastcomments-client/models/moderation_api_get_comments_response.rb new file mode 100644 index 0000000..02d9bbc --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_api_get_comments_response.rb @@ -0,0 +1,322 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationAPIGetCommentsResponse + attr_accessor :status + + attr_accessor :translations + + attr_accessor :comments + + attr_accessor :moderation_filter + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'translations' => :'translations', + :'comments' => :'comments', + :'moderation_filter' => :'moderationFilter' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'APIStatus', + :'translations' => :'Object', + :'comments' => :'Array', + :'moderation_filter' => :'ModerationFilter' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationAPIGetCommentsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationAPIGetCommentsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'translations') + self.translations = attributes[:'translations'] + else + self.translations = nil + end + + if attributes.key?(:'comments') + if (value = attributes[:'comments']).is_a?(Array) + self.comments = value + end + else + self.comments = nil + end + + if attributes.key?(:'moderation_filter') + self.moderation_filter = attributes[:'moderation_filter'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @translations.nil? + invalid_properties.push('invalid value for "translations", translations cannot be nil.') + end + + if @comments.nil? + invalid_properties.push('invalid value for "comments", comments cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + return false if @translations.nil? + return false if @comments.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] translations Value to be assigned + def translations=(translations) + if translations.nil? + fail ArgumentError, 'translations cannot be nil' + end + + @translations = translations + end + + # Custom attribute writer method with validation + # @param [Object] comments Value to be assigned + def comments=(comments) + if comments.nil? + fail ArgumentError, 'comments cannot be nil' + end + + @comments = comments + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + translations == o.translations && + comments == o.comments && + moderation_filter == o.moderation_filter + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, translations, comments, moderation_filter].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_api_get_logs_response.rb b/client/lib/fastcomments-client/models/moderation_api_get_logs_response.rb new file mode 100644 index 0000000..9c2c9e2 --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_api_get_logs_response.rb @@ -0,0 +1,287 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationAPIGetLogsResponse + attr_accessor :logs + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'logs' => :'logs', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'logs' => :'Array', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationAPIGetLogsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationAPIGetLogsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'logs') + if (value = attributes[:'logs']).is_a?(Array) + self.logs = value + end + else + self.logs = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @logs.nil? + invalid_properties.push('invalid value for "logs", logs cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @logs.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] logs Value to be assigned + def logs=(logs) + if logs.nil? + fail ArgumentError, 'logs cannot be nil' + end + + @logs = logs + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + logs == o.logs && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [logs, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_comment_search_response.rb b/client/lib/fastcomments-client/models/moderation_comment_search_response.rb new file mode 100644 index 0000000..cf3c139 --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_comment_search_response.rb @@ -0,0 +1,285 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationCommentSearchResponse + attr_accessor :comment_count + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'comment_count' => :'commentCount', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'comment_count' => :'Integer', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationCommentSearchResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationCommentSearchResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'comment_count') + self.comment_count = attributes[:'comment_count'] + else + self.comment_count = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @comment_count.nil? + invalid_properties.push('invalid value for "comment_count", comment_count cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @comment_count.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] comment_count Value to be assigned + def comment_count=(comment_count) + if comment_count.nil? + fail ArgumentError, 'comment_count cannot be nil' + end + + @comment_count = comment_count + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + comment_count == o.comment_count && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [comment_count, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_export_response.rb b/client/lib/fastcomments-client/models/moderation_export_response.rb new file mode 100644 index 0000000..c96b20f --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_export_response.rb @@ -0,0 +1,263 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationExportResponse + attr_accessor :status + + attr_accessor :batch_job_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'batch_job_id' => :'batchJobId' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'String', + :'batch_job_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationExportResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationExportResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'batch_job_id') + self.batch_job_id = attributes[:'batch_job_id'] + else + self.batch_job_id = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @batch_job_id.nil? + invalid_properties.push('invalid value for "batch_job_id", batch_job_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + return false if @batch_job_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] batch_job_id Value to be assigned + def batch_job_id=(batch_job_id) + if batch_job_id.nil? + fail ArgumentError, 'batch_job_id cannot be nil' + end + + @batch_job_id = batch_job_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + batch_job_id == o.batch_job_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, batch_job_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_export_status_response.rb b/client/lib/fastcomments-client/models/moderation_export_status_response.rb new file mode 100644 index 0000000..8cc349d --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_export_status_response.rb @@ -0,0 +1,298 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationExportStatusResponse + attr_accessor :status + + attr_accessor :job_status + + attr_accessor :record_count + + attr_accessor :download_url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'job_status' => :'jobStatus', + :'record_count' => :'recordCount', + :'download_url' => :'downloadUrl' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'String', + :'job_status' => :'String', + :'record_count' => :'Integer', + :'download_url' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationExportStatusResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationExportStatusResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'job_status') + self.job_status = attributes[:'job_status'] + else + self.job_status = nil + end + + if attributes.key?(:'record_count') + self.record_count = attributes[:'record_count'] + else + self.record_count = nil + end + + if attributes.key?(:'download_url') + self.download_url = attributes[:'download_url'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @job_status.nil? + invalid_properties.push('invalid value for "job_status", job_status cannot be nil.') + end + + if @record_count.nil? + invalid_properties.push('invalid value for "record_count", record_count cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + return false if @job_status.nil? + return false if @record_count.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] job_status Value to be assigned + def job_status=(job_status) + if job_status.nil? + fail ArgumentError, 'job_status cannot be nil' + end + + @job_status = job_status + end + + # Custom attribute writer method with validation + # @param [Object] record_count Value to be assigned + def record_count=(record_count) + if record_count.nil? + fail ArgumentError, 'record_count cannot be nil' + end + + @record_count = record_count + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + job_status == o.job_status && + record_count == o.record_count && + download_url == o.download_url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, job_status, record_count, download_url].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_filter.rb b/client/lib/fastcomments-client/models/moderation_filter.rb new file mode 100644 index 0000000..f4f2aba --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_filter.rb @@ -0,0 +1,325 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationFilter + attr_accessor :reviewed + + attr_accessor :approved + + attr_accessor :is_spam + + attr_accessor :is_banned_user + + attr_accessor :is_locked + + attr_accessor :flag_count_gt + + attr_accessor :user_id + + attr_accessor :url_id + + attr_accessor :domain + + attr_accessor :moderation_group_ids + + # Text search terms. Each term is matched case-insensitively against the comment text. A term wrapped in quotes means exact phrase match. + attr_accessor :comment_text_search + + # Set by the `exact=\"...\"` search syntax. The comment text must equal this value exactly (case-sensitive, full-string), as opposed to the substring matching of commentTextSearch. + attr_accessor :exact_comment_text + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reviewed' => :'reviewed', + :'approved' => :'approved', + :'is_spam' => :'isSpam', + :'is_banned_user' => :'isBannedUser', + :'is_locked' => :'isLocked', + :'flag_count_gt' => :'flagCountGt', + :'user_id' => :'userId', + :'url_id' => :'urlId', + :'domain' => :'domain', + :'moderation_group_ids' => :'moderationGroupIds', + :'comment_text_search' => :'commentTextSearch', + :'exact_comment_text' => :'exactCommentText' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'reviewed' => :'Boolean', + :'approved' => :'Boolean', + :'is_spam' => :'Boolean', + :'is_banned_user' => :'Boolean', + :'is_locked' => :'Boolean', + :'flag_count_gt' => :'Float', + :'user_id' => :'String', + :'url_id' => :'String', + :'domain' => :'String', + :'moderation_group_ids' => :'Array', + :'comment_text_search' => :'Array', + :'exact_comment_text' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationFilter` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationFilter`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'reviewed') + self.reviewed = attributes[:'reviewed'] + end + + if attributes.key?(:'approved') + self.approved = attributes[:'approved'] + end + + if attributes.key?(:'is_spam') + self.is_spam = attributes[:'is_spam'] + end + + if attributes.key?(:'is_banned_user') + self.is_banned_user = attributes[:'is_banned_user'] + end + + if attributes.key?(:'is_locked') + self.is_locked = attributes[:'is_locked'] + end + + if attributes.key?(:'flag_count_gt') + self.flag_count_gt = attributes[:'flag_count_gt'] + end + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'url_id') + self.url_id = attributes[:'url_id'] + end + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + end + + if attributes.key?(:'moderation_group_ids') + if (value = attributes[:'moderation_group_ids']).is_a?(Array) + self.moderation_group_ids = value + end + end + + if attributes.key?(:'comment_text_search') + if (value = attributes[:'comment_text_search']).is_a?(Array) + self.comment_text_search = value + end + end + + if attributes.key?(:'exact_comment_text') + self.exact_comment_text = attributes[:'exact_comment_text'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + reviewed == o.reviewed && + approved == o.approved && + is_spam == o.is_spam && + is_banned_user == o.is_banned_user && + is_locked == o.is_locked && + flag_count_gt == o.flag_count_gt && + user_id == o.user_id && + url_id == o.url_id && + domain == o.domain && + moderation_group_ids == o.moderation_group_ids && + comment_text_search == o.comment_text_search && + exact_comment_text == o.exact_comment_text + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [reviewed, approved, is_spam, is_banned_user, is_locked, flag_count_gt, user_id, url_id, domain, moderation_group_ids, comment_text_search, exact_comment_text].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_page_search_projected.rb b/client/lib/fastcomments-client/models/moderation_page_search_projected.rb new file mode 100644 index 0000000..3d9300c --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_page_search_projected.rb @@ -0,0 +1,315 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationPageSearchProjected + attr_accessor :url_id + + attr_accessor :url + + attr_accessor :title + + attr_accessor :comment_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'url_id' => :'urlId', + :'url' => :'url', + :'title' => :'title', + :'comment_count' => :'commentCount' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'url_id' => :'String', + :'url' => :'String', + :'title' => :'String', + :'comment_count' => :'Float' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationPageSearchProjected` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationPageSearchProjected`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'url_id') + self.url_id = attributes[:'url_id'] + else + self.url_id = nil + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + else + self.url = nil + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + else + self.title = nil + end + + if attributes.key?(:'comment_count') + self.comment_count = attributes[:'comment_count'] + else + self.comment_count = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @url_id.nil? + invalid_properties.push('invalid value for "url_id", url_id cannot be nil.') + end + + if @url.nil? + invalid_properties.push('invalid value for "url", url cannot be nil.') + end + + if @title.nil? + invalid_properties.push('invalid value for "title", title cannot be nil.') + end + + if @comment_count.nil? + invalid_properties.push('invalid value for "comment_count", comment_count cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @url_id.nil? + return false if @url.nil? + return false if @title.nil? + return false if @comment_count.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] url_id Value to be assigned + def url_id=(url_id) + if url_id.nil? + fail ArgumentError, 'url_id cannot be nil' + end + + @url_id = url_id + end + + # Custom attribute writer method with validation + # @param [Object] url Value to be assigned + def url=(url) + if url.nil? + fail ArgumentError, 'url cannot be nil' + end + + @url = url + end + + # Custom attribute writer method with validation + # @param [Object] title Value to be assigned + def title=(title) + if title.nil? + fail ArgumentError, 'title cannot be nil' + end + + @title = title + end + + # Custom attribute writer method with validation + # @param [Object] comment_count Value to be assigned + def comment_count=(comment_count) + if comment_count.nil? + fail ArgumentError, 'comment_count cannot be nil' + end + + @comment_count = comment_count + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + url_id == o.url_id && + url == o.url && + title == o.title && + comment_count == o.comment_count + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [url_id, url, title, comment_count].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_page_search_response.rb b/client/lib/fastcomments-client/models/moderation_page_search_response.rb new file mode 100644 index 0000000..9a62ab0 --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_page_search_response.rb @@ -0,0 +1,287 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationPageSearchResponse + attr_accessor :pages + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'pages' => :'pages', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'pages' => :'Array', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationPageSearchResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationPageSearchResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'pages') + if (value = attributes[:'pages']).is_a?(Array) + self.pages = value + end + else + self.pages = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @pages.nil? + invalid_properties.push('invalid value for "pages", pages cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @pages.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] pages Value to be assigned + def pages=(pages) + if pages.nil? + fail ArgumentError, 'pages cannot be nil' + end + + @pages = pages + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + pages == o.pages && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [pages, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_site_search_projected.rb b/client/lib/fastcomments-client/models/moderation_site_search_projected.rb new file mode 100644 index 0000000..330ad61 --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_site_search_projected.rb @@ -0,0 +1,247 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationSiteSearchProjected + attr_accessor :domain + + attr_accessor :logo_src100px + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'domain' => :'domain', + :'logo_src100px' => :'logoSrc100px' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'domain' => :'String', + :'logo_src100px' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'logo_src100px' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationSiteSearchProjected` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationSiteSearchProjected`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + else + self.domain = nil + end + + if attributes.key?(:'logo_src100px') + self.logo_src100px = attributes[:'logo_src100px'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @domain.nil? + invalid_properties.push('invalid value for "domain", domain cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @domain.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] domain Value to be assigned + def domain=(domain) + if domain.nil? + fail ArgumentError, 'domain cannot be nil' + end + + @domain = domain + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + domain == o.domain && + logo_src100px == o.logo_src100px + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [domain, logo_src100px].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_site_search_response.rb b/client/lib/fastcomments-client/models/moderation_site_search_response.rb new file mode 100644 index 0000000..ccf6009 --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_site_search_response.rb @@ -0,0 +1,287 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationSiteSearchResponse + attr_accessor :sites + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sites' => :'sites', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'sites' => :'Array', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationSiteSearchResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationSiteSearchResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'sites') + if (value = attributes[:'sites']).is_a?(Array) + self.sites = value + end + else + self.sites = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @sites.nil? + invalid_properties.push('invalid value for "sites", sites cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @sites.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] sites Value to be assigned + def sites=(sites) + if sites.nil? + fail ArgumentError, 'sites cannot be nil' + end + + @sites = sites + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sites == o.sites && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [sites, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_suggest_response.rb b/client/lib/fastcomments-client/models/moderation_suggest_response.rb new file mode 100644 index 0000000..b9cdd00 --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_suggest_response.rb @@ -0,0 +1,268 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationSuggestResponse + attr_accessor :status + + attr_accessor :pages + + attr_accessor :users + + attr_accessor :code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'pages' => :'pages', + :'users' => :'users', + :'code' => :'code' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'String', + :'pages' => :'Array', + :'users' => :'Array', + :'code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationSuggestResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationSuggestResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'pages') + if (value = attributes[:'pages']).is_a?(Array) + self.pages = value + end + end + + if attributes.key?(:'users') + if (value = attributes[:'users']).is_a?(Array) + self.users = value + end + end + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + pages == o.pages && + users == o.users && + code == o.code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, pages, users, code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_user_search_projected.rb b/client/lib/fastcomments-client/models/moderation_user_search_projected.rb new file mode 100644 index 0000000..d5c61bd --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_user_search_projected.rb @@ -0,0 +1,283 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationUserSearchProjected + attr_accessor :_id + + attr_accessor :username + + attr_accessor :display_name + + attr_accessor :avatar_src + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_id' => :'_id', + :'username' => :'username', + :'display_name' => :'displayName', + :'avatar_src' => :'avatarSrc' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'_id' => :'String', + :'username' => :'String', + :'display_name' => :'String', + :'avatar_src' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'display_name', + :'avatar_src' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationUserSearchProjected` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationUserSearchProjected`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'_id') + self._id = attributes[:'_id'] + else + self._id = nil + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + else + self.username = nil + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'avatar_src') + self.avatar_src = attributes[:'avatar_src'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @_id.nil? + invalid_properties.push('invalid value for "_id", _id cannot be nil.') + end + + if @username.nil? + invalid_properties.push('invalid value for "username", username cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @_id.nil? + return false if @username.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] _id Value to be assigned + def _id=(_id) + if _id.nil? + fail ArgumentError, '_id cannot be nil' + end + + @_id = _id + end + + # Custom attribute writer method with validation + # @param [Object] username Value to be assigned + def username=(username) + if username.nil? + fail ArgumentError, 'username cannot be nil' + end + + @username = username + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _id == o._id && + username == o.username && + display_name == o.display_name && + avatar_src == o.avatar_src + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [_id, username, display_name, avatar_src].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderation_user_search_response.rb b/client/lib/fastcomments-client/models/moderation_user_search_response.rb new file mode 100644 index 0000000..c6b12d8 --- /dev/null +++ b/client/lib/fastcomments-client/models/moderation_user_search_response.rb @@ -0,0 +1,287 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class ModerationUserSearchResponse + attr_accessor :users + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'users' => :'users', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'users' => :'Array', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ModerationUserSearchResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ModerationUserSearchResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'users') + if (value = attributes[:'users']).is_a?(Array) + self.users = value + end + else + self.users = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @users.nil? + invalid_properties.push('invalid value for "users", users cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @users.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] users Value to be assigned + def users=(users) + if users.nil? + fail ArgumentError, 'users cannot be nil' + end + + @users = users + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + users == o.users && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [users, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/moderator.rb b/client/lib/fastcomments-client/models/moderator.rb index 7970d15..15fb420 100644 --- a/client/lib/fastcomments-client/models/moderator.rb +++ b/client/lib/fastcomments-client/models/moderator.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class Moderator < ApiModelBase + class Moderator attr_accessor :_id attr_accessor :tenant_id @@ -526,6 +526,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -542,6 +597,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/notification_and_count.rb b/client/lib/fastcomments-client/models/notification_and_count.rb index 46bc5f8..c4122d9 100644 --- a/client/lib/fastcomments-client/models/notification_and_count.rb +++ b/client/lib/fastcomments-client/models/notification_and_count.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class NotificationAndCount < ApiModelBase + class NotificationAndCount attr_accessor :type attr_accessor :count @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/notification_object_type.rb b/client/lib/fastcomments-client/models/notification_object_type.rb index 0b2ef78..8978509 100644 --- a/client/lib/fastcomments-client/models/notification_object_type.rb +++ b/client/lib/fastcomments-client/models/notification_object_type.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/notification_type.rb b/client/lib/fastcomments-client/models/notification_type.rb index 24474a0..9dca431 100644 --- a/client/lib/fastcomments-client/models/notification_type.rb +++ b/client/lib/fastcomments-client/models/notification_type.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/page_user_entry.rb b/client/lib/fastcomments-client/models/page_user_entry.rb new file mode 100644 index 0000000..8430c3d --- /dev/null +++ b/client/lib/fastcomments-client/models/page_user_entry.rb @@ -0,0 +1,281 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class PageUserEntry + attr_accessor :is_private + + attr_accessor :avatar_src + + attr_accessor :display_name + + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'is_private' => :'isPrivate', + :'avatar_src' => :'avatarSrc', + :'display_name' => :'displayName', + :'id' => :'id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'is_private' => :'Boolean', + :'avatar_src' => :'String', + :'display_name' => :'String', + :'id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::PageUserEntry` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::PageUserEntry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'is_private') + self.is_private = attributes[:'is_private'] + end + + if attributes.key?(:'avatar_src') + self.avatar_src = attributes[:'avatar_src'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + else + self.display_name = nil + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @display_name.nil? + invalid_properties.push('invalid value for "display_name", display_name cannot be nil.') + end + + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @display_name.nil? + return false if @id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] display_name Value to be assigned + def display_name=(display_name) + if display_name.nil? + fail ArgumentError, 'display_name cannot be nil' + end + + @display_name = display_name + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + is_private == o.is_private && + avatar_src == o.avatar_src && + display_name == o.display_name && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [is_private, avatar_src, display_name, id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/page_users_info_response.rb b/client/lib/fastcomments-client/models/page_users_info_response.rb new file mode 100644 index 0000000..9d8098e --- /dev/null +++ b/client/lib/fastcomments-client/models/page_users_info_response.rb @@ -0,0 +1,287 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class PageUsersInfoResponse + attr_accessor :users + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'users' => :'users', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'users' => :'Array', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::PageUsersInfoResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::PageUsersInfoResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'users') + if (value = attributes[:'users']).is_a?(Array) + self.users = value + end + else + self.users = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @users.nil? + invalid_properties.push('invalid value for "users", users cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @users.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] users Value to be assigned + def users=(users) + if users.nil? + fail ArgumentError, 'users cannot be nil' + end + + @users = users + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + users == o.users && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [users, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/page_users_offline_response.rb b/client/lib/fastcomments-client/models/page_users_offline_response.rb new file mode 100644 index 0000000..6b016cf --- /dev/null +++ b/client/lib/fastcomments-client/models/page_users_offline_response.rb @@ -0,0 +1,311 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class PageUsersOfflineResponse + attr_accessor :next_after_user_id + + attr_accessor :next_after_name + + attr_accessor :users + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'next_after_user_id' => :'nextAfterUserId', + :'next_after_name' => :'nextAfterName', + :'users' => :'users', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'next_after_user_id' => :'String', + :'next_after_name' => :'String', + :'users' => :'Array', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'next_after_user_id', + :'next_after_name', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::PageUsersOfflineResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::PageUsersOfflineResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'next_after_user_id') + self.next_after_user_id = attributes[:'next_after_user_id'] + else + self.next_after_user_id = nil + end + + if attributes.key?(:'next_after_name') + self.next_after_name = attributes[:'next_after_name'] + else + self.next_after_name = nil + end + + if attributes.key?(:'users') + if (value = attributes[:'users']).is_a?(Array) + self.users = value + end + else + self.users = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @users.nil? + invalid_properties.push('invalid value for "users", users cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @users.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] users Value to be assigned + def users=(users) + if users.nil? + fail ArgumentError, 'users cannot be nil' + end + + @users = users + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + next_after_user_id == o.next_after_user_id && + next_after_name == o.next_after_name && + users == o.users && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [next_after_user_id, next_after_name, users, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/page_users_online_response.rb b/client/lib/fastcomments-client/models/page_users_online_response.rb new file mode 100644 index 0000000..1fedec9 --- /dev/null +++ b/client/lib/fastcomments-client/models/page_users_online_response.rb @@ -0,0 +1,363 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class PageUsersOnlineResponse + attr_accessor :next_after_user_id + + attr_accessor :next_after_name + + attr_accessor :total_count + + attr_accessor :anon_count + + attr_accessor :users + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'next_after_user_id' => :'nextAfterUserId', + :'next_after_name' => :'nextAfterName', + :'total_count' => :'totalCount', + :'anon_count' => :'anonCount', + :'users' => :'users', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'next_after_user_id' => :'String', + :'next_after_name' => :'String', + :'total_count' => :'Float', + :'anon_count' => :'Float', + :'users' => :'Array', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'next_after_user_id', + :'next_after_name', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::PageUsersOnlineResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::PageUsersOnlineResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'next_after_user_id') + self.next_after_user_id = attributes[:'next_after_user_id'] + else + self.next_after_user_id = nil + end + + if attributes.key?(:'next_after_name') + self.next_after_name = attributes[:'next_after_name'] + else + self.next_after_name = nil + end + + if attributes.key?(:'total_count') + self.total_count = attributes[:'total_count'] + else + self.total_count = nil + end + + if attributes.key?(:'anon_count') + self.anon_count = attributes[:'anon_count'] + else + self.anon_count = nil + end + + if attributes.key?(:'users') + if (value = attributes[:'users']).is_a?(Array) + self.users = value + end + else + self.users = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @total_count.nil? + invalid_properties.push('invalid value for "total_count", total_count cannot be nil.') + end + + if @anon_count.nil? + invalid_properties.push('invalid value for "anon_count", anon_count cannot be nil.') + end + + if @users.nil? + invalid_properties.push('invalid value for "users", users cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @total_count.nil? + return false if @anon_count.nil? + return false if @users.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] total_count Value to be assigned + def total_count=(total_count) + if total_count.nil? + fail ArgumentError, 'total_count cannot be nil' + end + + @total_count = total_count + end + + # Custom attribute writer method with validation + # @param [Object] anon_count Value to be assigned + def anon_count=(anon_count) + if anon_count.nil? + fail ArgumentError, 'anon_count cannot be nil' + end + + @anon_count = anon_count + end + + # Custom attribute writer method with validation + # @param [Object] users Value to be assigned + def users=(users) + if users.nil? + fail ArgumentError, 'users cannot be nil' + end + + @users = users + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + next_after_user_id == o.next_after_user_id && + next_after_name == o.next_after_name && + total_count == o.total_count && + anon_count == o.anon_count && + users == o.users && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [next_after_user_id, next_after_name, total_count, anon_count, users, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/pages_sort_by.rb b/client/lib/fastcomments-client/models/pages_sort_by.rb new file mode 100644 index 0000000..33368dc --- /dev/null +++ b/client/lib/fastcomments-client/models/pages_sort_by.rb @@ -0,0 +1,41 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class PagesSortBy + UPDATED_AT = "updatedAt".freeze + COMMENT_COUNT = "commentCount".freeze + TITLE = "title".freeze + + def self.all_vars + @all_vars ||= [UPDATED_AT, COMMENT_COUNT, TITLE].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if PagesSortBy.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #PagesSortBy" + end + end +end diff --git a/client/lib/fastcomments-client/models/patch_domain_config_params.rb b/client/lib/fastcomments-client/models/patch_domain_config_params.rb index fa0dcfd..aadec6d 100644 --- a/client/lib/fastcomments-client/models/patch_domain_config_params.rb +++ b/client/lib/fastcomments-client/models/patch_domain_config_params.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class PatchDomainConfigParams < ApiModelBase + class PatchDomainConfigParams attr_accessor :domain attr_accessor :email_from_name @@ -183,6 +183,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -199,6 +254,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/patch_domain_config_response.rb b/client/lib/fastcomments-client/models/patch_domain_config_response.rb new file mode 100644 index 0000000..6456523 --- /dev/null +++ b/client/lib/fastcomments-client/models/patch_domain_config_response.rb @@ -0,0 +1,104 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + module PatchDomainConfigResponse + class << self + # List of class defined in anyOf (OpenAPI v3) + def openapi_any_of + [ + :'AddDomainConfigResponseAnyOf', + :'GetDomainConfigsResponseAnyOf1' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of anyOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of anyOf items and attempt to identify the appropriate one. + # Note: + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_any_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_any_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass, data) + return if data.nil? + + case klass.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.iso8601(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type, item) } + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } + end + else # model + const = FastCommentsClient.const_get(klass) + if const + if const.respond_to?(:openapi_any_of) # nested anyOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue + raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" + end + end + end + +end diff --git a/client/lib/fastcomments-client/models/patch_hash_tag200_response.rb b/client/lib/fastcomments-client/models/patch_hash_tag200_response.rb deleted file mode 100644 index 3b7f111..0000000 --- a/client/lib/fastcomments-client/models/patch_hash_tag200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module PatchHashTag200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'UpdateHashTagResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/patch_page_api_response.rb b/client/lib/fastcomments-client/models/patch_page_api_response.rb index b41e5ca..0618bed 100644 --- a/client/lib/fastcomments-client/models/patch_page_api_response.rb +++ b/client/lib/fastcomments-client/models/patch_page_api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class PatchPageAPIResponse < ApiModelBase + class PatchPageAPIResponse attr_accessor :reason attr_accessor :code @@ -179,6 +179,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -195,6 +250,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/patch_sso_user_api_response.rb b/client/lib/fastcomments-client/models/patch_sso_user_api_response.rb index 78334a6..57e29a6 100644 --- a/client/lib/fastcomments-client/models/patch_sso_user_api_response.rb +++ b/client/lib/fastcomments-client/models/patch_sso_user_api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class PatchSSOUserAPIResponse < ApiModelBase + class PatchSSOUserAPIResponse attr_accessor :reason attr_accessor :code @@ -170,6 +170,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -186,6 +241,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/pending_comment_to_sync_outbound.rb b/client/lib/fastcomments-client/models/pending_comment_to_sync_outbound.rb index dcf9d7a..0153f95 100644 --- a/client/lib/fastcomments-client/models/pending_comment_to_sync_outbound.rb +++ b/client/lib/fastcomments-client/models/pending_comment_to_sync_outbound.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class PendingCommentToSyncOutbound < ApiModelBase + class PendingCommentToSyncOutbound attr_accessor :_id attr_accessor :comment_id @@ -407,6 +407,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -423,6 +478,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/pin_comment200_response.rb b/client/lib/fastcomments-client/models/pin_comment200_response.rb deleted file mode 100644 index 02e9054..0000000 --- a/client/lib/fastcomments-client/models/pin_comment200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module PinComment200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'ChangeCommentPinStatusResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/post_remove_comment_response.rb b/client/lib/fastcomments-client/models/post_remove_comment_response.rb new file mode 100644 index 0000000..27cc60b --- /dev/null +++ b/client/lib/fastcomments-client/models/post_remove_comment_response.rb @@ -0,0 +1,104 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + module PostRemoveCommentResponse + class << self + # List of class defined in anyOf (OpenAPI v3) + def openapi_any_of + [ + :'DeleteCommentResult', + :'RemoveCommentActionResponse' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of anyOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of anyOf items and attempt to identify the appropriate one. + # Note: + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_any_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_any_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass, data) + return if data.nil? + + case klass.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.iso8601(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type, item) } + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } + end + else # model + const = FastCommentsClient.const_get(klass) + if const + if const.respond_to?(:openapi_any_of) # nested anyOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue + raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" + end + end + end + +end diff --git a/client/lib/fastcomments-client/models/pre_ban_summary.rb b/client/lib/fastcomments-client/models/pre_ban_summary.rb new file mode 100644 index 0000000..08163c4 --- /dev/null +++ b/client/lib/fastcomments-client/models/pre_ban_summary.rb @@ -0,0 +1,313 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class PreBanSummary + attr_accessor :status + + attr_accessor :usernames + + attr_accessor :count + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'usernames' => :'usernames', + :'count' => :'count' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'APIStatus', + :'usernames' => :'Array', + :'count' => :'Float' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::PreBanSummary` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::PreBanSummary`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'usernames') + if (value = attributes[:'usernames']).is_a?(Array) + self.usernames = value + end + else + self.usernames = nil + end + + if attributes.key?(:'count') + self.count = attributes[:'count'] + else + self.count = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @usernames.nil? + invalid_properties.push('invalid value for "usernames", usernames cannot be nil.') + end + + if @count.nil? + invalid_properties.push('invalid value for "count", count cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + return false if @usernames.nil? + return false if @count.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] usernames Value to be assigned + def usernames=(usernames) + if usernames.nil? + fail ArgumentError, 'usernames cannot be nil' + end + + @usernames = usernames + end + + # Custom attribute writer method with validation + # @param [Object] count Value to be assigned + def count=(count) + if count.nil? + fail ArgumentError, 'count cannot be nil' + end + + @count = count + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + usernames == o.usernames && + count == o.count + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, usernames, count].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/pub_sub_comment.rb b/client/lib/fastcomments-client/models/pub_sub_comment.rb index 7adf77a..878c891 100644 --- a/client/lib/fastcomments-client/models/pub_sub_comment.rb +++ b/client/lib/fastcomments-client/models/pub_sub_comment.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class PubSubComment < ApiModelBase + class PubSubComment attr_accessor :_id attr_accessor :tenant_id @@ -709,6 +709,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -725,6 +780,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/pub_sub_comment_base.rb b/client/lib/fastcomments-client/models/pub_sub_comment_base.rb index 4b07216..07de243 100644 --- a/client/lib/fastcomments-client/models/pub_sub_comment_base.rb +++ b/client/lib/fastcomments-client/models/pub_sub_comment_base.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class PubSubCommentBase < ApiModelBase + class PubSubCommentBase attr_accessor :_id attr_accessor :tenant_id @@ -658,6 +658,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -674,6 +729,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/pub_sub_vote.rb b/client/lib/fastcomments-client/models/pub_sub_vote.rb index b3daecb..de4cb34 100644 --- a/client/lib/fastcomments-client/models/pub_sub_vote.rb +++ b/client/lib/fastcomments-client/models/pub_sub_vote.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class PubSubVote < ApiModelBase + class PubSubVote attr_accessor :_id attr_accessor :tenant_id @@ -321,6 +321,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -337,6 +392,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/public_api_delete_comment_response.rb b/client/lib/fastcomments-client/models/public_api_delete_comment_response.rb index 7aaf1f2..e7f868c 100644 --- a/client/lib/fastcomments-client/models/public_api_delete_comment_response.rb +++ b/client/lib/fastcomments-client/models/public_api_delete_comment_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class PublicAPIDeleteCommentResponse < ApiModelBase + class PublicAPIDeleteCommentResponse attr_accessor :comment attr_accessor :hard_removed @@ -200,6 +200,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -216,6 +271,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/public_api_get_comment_text_response.rb b/client/lib/fastcomments-client/models/public_api_get_comment_text_response.rb index 1fd4977..e50d874 100644 --- a/client/lib/fastcomments-client/models/public_api_get_comment_text_response.rb +++ b/client/lib/fastcomments-client/models/public_api_get_comment_text_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class PublicAPIGetCommentTextResponse < ApiModelBase + class PublicAPIGetCommentTextResponse attr_accessor :status attr_accessor :comment_text @@ -217,6 +217,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -233,6 +288,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/public_api_set_comment_text_response.rb b/client/lib/fastcomments-client/models/public_api_set_comment_text_response.rb index 75833ea..ecc5c00 100644 --- a/client/lib/fastcomments-client/models/public_api_set_comment_text_response.rb +++ b/client/lib/fastcomments-client/models/public_api_set_comment_text_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class PublicAPISetCommentTextResponse < ApiModelBase + class PublicAPISetCommentTextResponse attr_accessor :comment attr_accessor :status @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/public_block_from_comment_params.rb b/client/lib/fastcomments-client/models/public_block_from_comment_params.rb index 63b3e34..18caff1 100644 --- a/client/lib/fastcomments-client/models/public_block_from_comment_params.rb +++ b/client/lib/fastcomments-client/models/public_block_from_comment_params.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class PublicBlockFromCommentParams < ApiModelBase + class PublicBlockFromCommentParams # A list of comment ids to check if are blocked after performing the update. attr_accessor :comment_ids @@ -132,6 +132,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -148,6 +203,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/public_comment.rb b/client/lib/fastcomments-client/models/public_comment.rb index f2af9a7..cd7948e 100644 --- a/client/lib/fastcomments-client/models/public_comment.rb +++ b/client/lib/fastcomments-client/models/public_comment.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class PublicComment < ApiModelBase + class PublicComment attr_accessor :_id attr_accessor :user_id @@ -569,6 +569,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -585,6 +640,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/public_comment_base.rb b/client/lib/fastcomments-client/models/public_comment_base.rb index 67e31a1..cbc7fbd 100644 --- a/client/lib/fastcomments-client/models/public_comment_base.rb +++ b/client/lib/fastcomments-client/models/public_comment_base.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class PublicCommentBase < ApiModelBase + class PublicCommentBase attr_accessor :_id attr_accessor :user_id @@ -467,6 +467,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -483,6 +538,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/public_feed_posts_response.rb b/client/lib/fastcomments-client/models/public_feed_posts_response.rb index f88fffd..5fda1cb 100644 --- a/client/lib/fastcomments-client/models/public_feed_posts_response.rb +++ b/client/lib/fastcomments-client/models/public_feed_posts_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class PublicFeedPostsResponse < ApiModelBase + class PublicFeedPostsResponse attr_accessor :status attr_accessor :feed_posts @@ -249,6 +249,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -265,6 +320,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/public_page.rb b/client/lib/fastcomments-client/models/public_page.rb new file mode 100644 index 0000000..2331ac6 --- /dev/null +++ b/client/lib/fastcomments-client/models/public_page.rb @@ -0,0 +1,341 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class PublicPage + attr_accessor :updated_at + + attr_accessor :comment_count + + attr_accessor :title + + attr_accessor :url + + attr_accessor :url_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'updated_at' => :'updatedAt', + :'comment_count' => :'commentCount', + :'title' => :'title', + :'url' => :'url', + :'url_id' => :'urlId' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'updated_at' => :'Integer', + :'comment_count' => :'Integer', + :'title' => :'String', + :'url' => :'String', + :'url_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::PublicPage` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::PublicPage`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + else + self.updated_at = nil + end + + if attributes.key?(:'comment_count') + self.comment_count = attributes[:'comment_count'] + else + self.comment_count = nil + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + else + self.title = nil + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + else + self.url = nil + end + + if attributes.key?(:'url_id') + self.url_id = attributes[:'url_id'] + else + self.url_id = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + + if @comment_count.nil? + invalid_properties.push('invalid value for "comment_count", comment_count cannot be nil.') + end + + if @title.nil? + invalid_properties.push('invalid value for "title", title cannot be nil.') + end + + if @url.nil? + invalid_properties.push('invalid value for "url", url cannot be nil.') + end + + if @url_id.nil? + invalid_properties.push('invalid value for "url_id", url_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @updated_at.nil? + return false if @comment_count.nil? + return false if @title.nil? + return false if @url.nil? + return false if @url_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] updated_at Value to be assigned + def updated_at=(updated_at) + if updated_at.nil? + fail ArgumentError, 'updated_at cannot be nil' + end + + @updated_at = updated_at + end + + # Custom attribute writer method with validation + # @param [Object] comment_count Value to be assigned + def comment_count=(comment_count) + if comment_count.nil? + fail ArgumentError, 'comment_count cannot be nil' + end + + @comment_count = comment_count + end + + # Custom attribute writer method with validation + # @param [Object] title Value to be assigned + def title=(title) + if title.nil? + fail ArgumentError, 'title cannot be nil' + end + + @title = title + end + + # Custom attribute writer method with validation + # @param [Object] url Value to be assigned + def url=(url) + if url.nil? + fail ArgumentError, 'url cannot be nil' + end + + @url = url + end + + # Custom attribute writer method with validation + # @param [Object] url_id Value to be assigned + def url_id=(url_id) + if url_id.nil? + fail ArgumentError, 'url_id cannot be nil' + end + + @url_id = url_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + updated_at == o.updated_at && + comment_count == o.comment_count && + title == o.title && + url == o.url && + url_id == o.url_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [updated_at, comment_count, title, url, url_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/public_vote.rb b/client/lib/fastcomments-client/models/public_vote.rb index d699b94..9a12fe4 100644 --- a/client/lib/fastcomments-client/models/public_vote.rb +++ b/client/lib/fastcomments-client/models/public_vote.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class PublicVote < ApiModelBase + class PublicVote attr_accessor :id attr_accessor :url_id @@ -273,6 +273,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -289,6 +344,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/put_domain_config_response.rb b/client/lib/fastcomments-client/models/put_domain_config_response.rb new file mode 100644 index 0000000..416dbd8 --- /dev/null +++ b/client/lib/fastcomments-client/models/put_domain_config_response.rb @@ -0,0 +1,104 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + module PutDomainConfigResponse + class << self + # List of class defined in anyOf (OpenAPI v3) + def openapi_any_of + [ + :'AddDomainConfigResponseAnyOf', + :'GetDomainConfigsResponseAnyOf1' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of anyOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of anyOf items and attempt to identify the appropriate one. + # Note: + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_any_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_any_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass, data) + return if data.nil? + + case klass.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.iso8601(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type, item) } + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } + end + else # model + const = FastCommentsClient.const_get(klass) + if const + if const.respond_to?(:openapi_any_of) # nested anyOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue + raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" + end + end + end + +end diff --git a/client/lib/fastcomments-client/models/put_sso_user_api_response.rb b/client/lib/fastcomments-client/models/put_sso_user_api_response.rb index a61a8b1..c81ea5b 100644 --- a/client/lib/fastcomments-client/models/put_sso_user_api_response.rb +++ b/client/lib/fastcomments-client/models/put_sso_user_api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class PutSSOUserAPIResponse < ApiModelBase + class PutSSOUserAPIResponse attr_accessor :reason attr_accessor :code @@ -171,6 +171,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -187,6 +242,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/query_predicate.rb b/client/lib/fastcomments-client/models/query_predicate.rb index a9df85c..6109065 100644 --- a/client/lib/fastcomments-client/models/query_predicate.rb +++ b/client/lib/fastcomments-client/models/query_predicate.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class QueryPredicate < ApiModelBase + class QueryPredicate attr_accessor :key attr_accessor :value @@ -219,6 +219,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -235,6 +290,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/query_predicate_value.rb b/client/lib/fastcomments-client/models/query_predicate_value.rb index fff8087..f729fec 100644 --- a/client/lib/fastcomments-client/models/query_predicate_value.rb +++ b/client/lib/fastcomments-client/models/query_predicate_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -38,7 +38,8 @@ def build(data) openapi_any_of.each do |klass| begin next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data rescue # rescue all errors so we keep iterating even if the current item lookup raises end end diff --git a/client/lib/fastcomments-client/models/question_config.rb b/client/lib/fastcomments-client/models/question_config.rb index 03c50f1..f85f89e 100644 --- a/client/lib/fastcomments-client/models/question_config.rb +++ b/client/lib/fastcomments-client/models/question_config.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class QuestionConfig < ApiModelBase + class QuestionConfig attr_accessor :_id attr_accessor :tenant_id @@ -650,6 +650,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -666,6 +721,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/question_config_custom_options_inner.rb b/client/lib/fastcomments-client/models/question_config_custom_options_inner.rb index fa83888..e76631c 100644 --- a/client/lib/fastcomments-client/models/question_config_custom_options_inner.rb +++ b/client/lib/fastcomments-client/models/question_config_custom_options_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class QuestionConfigCustomOptionsInner < ApiModelBase + class QuestionConfigCustomOptionsInner attr_accessor :image_src attr_accessor :name @@ -169,6 +169,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -185,6 +240,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/question_datum.rb b/client/lib/fastcomments-client/models/question_datum.rb index 33a293d..2fab8a1 100644 --- a/client/lib/fastcomments-client/models/question_datum.rb +++ b/client/lib/fastcomments-client/models/question_datum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class QuestionDatum < ApiModelBase + class QuestionDatum # Construct a type with a set of properties K of type T attr_accessor :v @@ -172,6 +172,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -188,6 +243,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/question_rendering_type.rb b/client/lib/fastcomments-client/models/question_rendering_type.rb index 8f98404..5d718fe 100644 --- a/client/lib/fastcomments-client/models/question_rendering_type.rb +++ b/client/lib/fastcomments-client/models/question_rendering_type.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/question_result.rb b/client/lib/fastcomments-client/models/question_result.rb index e8d0de9..067b8e0 100644 --- a/client/lib/fastcomments-client/models/question_result.rb +++ b/client/lib/fastcomments-client/models/question_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class QuestionResult < ApiModelBase + class QuestionResult attr_accessor :_id attr_accessor :tenant_id @@ -373,6 +373,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -389,6 +444,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/question_result_aggregation_overall.rb b/client/lib/fastcomments-client/models/question_result_aggregation_overall.rb index 9b5eb20..d63d811 100644 --- a/client/lib/fastcomments-client/models/question_result_aggregation_overall.rb +++ b/client/lib/fastcomments-client/models/question_result_aggregation_overall.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class QuestionResultAggregationOverall < ApiModelBase + class QuestionResultAggregationOverall # Construct a type with a set of properties K of type T attr_accessor :data_by_date_bucket @@ -213,6 +213,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -229,6 +284,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/question_sub_question_visibility.rb b/client/lib/fastcomments-client/models/question_sub_question_visibility.rb index dbe48c7..481bd2d 100644 --- a/client/lib/fastcomments-client/models/question_sub_question_visibility.rb +++ b/client/lib/fastcomments-client/models/question_sub_question_visibility.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/question_when_save.rb b/client/lib/fastcomments-client/models/question_when_save.rb index 8f3fac6..3886dcf 100644 --- a/client/lib/fastcomments-client/models/question_when_save.rb +++ b/client/lib/fastcomments-client/models/question_when_save.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/react_body_params.rb b/client/lib/fastcomments-client/models/react_body_params.rb index b5d320b..ff7ed10 100644 --- a/client/lib/fastcomments-client/models/react_body_params.rb +++ b/client/lib/fastcomments-client/models/react_body_params.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class ReactBodyParams < ApiModelBase + class ReactBodyParams attr_accessor :react_type # Attribute mapping from ruby-style variable name to JSON key. @@ -126,6 +126,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -142,6 +197,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/react_feed_post_public200_response.rb b/client/lib/fastcomments-client/models/react_feed_post_public200_response.rb deleted file mode 100644 index b594ef6..0000000 --- a/client/lib/fastcomments-client/models/react_feed_post_public200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module ReactFeedPostPublic200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'ReactFeedPostResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/react_feed_post_response.rb b/client/lib/fastcomments-client/models/react_feed_post_response.rb index 984d3f6..f21d41f 100644 --- a/client/lib/fastcomments-client/models/react_feed_post_response.rb +++ b/client/lib/fastcomments-client/models/react_feed_post_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class ReactFeedPostResponse < ApiModelBase + class ReactFeedPostResponse attr_accessor :status attr_accessor :react_type @@ -217,6 +217,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -233,6 +288,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/record_string_before_string_or_null_after_string_or_null_value.rb b/client/lib/fastcomments-client/models/record_string_before_string_or_null_after_string_or_null_value.rb index 106f134..6b03fd5 100644 --- a/client/lib/fastcomments-client/models/record_string_before_string_or_null_after_string_or_null_value.rb +++ b/client/lib/fastcomments-client/models/record_string_before_string_or_null_after_string_or_null_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class RecordStringBeforeStringOrNullAfterStringOrNullValue < ApiModelBase + class RecordStringBeforeStringOrNullAfterStringOrNullValue attr_accessor :after attr_accessor :before @@ -48,6 +48,8 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'after', + :'before' ]) end @@ -85,14 +87,6 @@ def initialize(attributes = {}) def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new - if @after.nil? - invalid_properties.push('invalid value for "after", after cannot be nil.') - end - - if @before.nil? - invalid_properties.push('invalid value for "before", before cannot be nil.') - end - invalid_properties end @@ -100,31 +94,9 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @after.nil? - return false if @before.nil? true end - # Custom attribute writer method with validation - # @param [Object] after Value to be assigned - def after=(after) - if after.nil? - fail ArgumentError, 'after cannot be nil' - end - - @after = after - end - - # Custom attribute writer method with validation - # @param [Object] before Value to be assigned - def before=(before) - if before.nil? - fail ArgumentError, 'before cannot be nil' - end - - @before = before - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -169,6 +141,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -185,6 +212,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/remove_comment_action_response.rb b/client/lib/fastcomments-client/models/remove_comment_action_response.rb new file mode 100644 index 0000000..cd1eff3 --- /dev/null +++ b/client/lib/fastcomments-client/models/remove_comment_action_response.rb @@ -0,0 +1,263 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class RemoveCommentActionResponse + attr_accessor :status + + attr_accessor :action + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'action' => :'action' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'String', + :'action' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::RemoveCommentActionResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::RemoveCommentActionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'action') + self.action = attributes[:'action'] + else + self.action = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @action.nil? + invalid_properties.push('invalid value for "action", action cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + return false if @action.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] action Value to be assigned + def action=(action) + if action.nil? + fail ArgumentError, 'action cannot be nil' + end + + @action = action + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + action == o.action + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, action].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/remove_user_badge_response.rb b/client/lib/fastcomments-client/models/remove_user_badge_response.rb new file mode 100644 index 0000000..64a7908 --- /dev/null +++ b/client/lib/fastcomments-client/models/remove_user_badge_response.rb @@ -0,0 +1,270 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class RemoveUserBadgeResponse + attr_accessor :badges + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'badges' => :'badges', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'badges' => :'Array', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::RemoveUserBadgeResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::RemoveUserBadgeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'badges') + if (value = attributes[:'badges']).is_a?(Array) + self.badges = value + end + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + badges == o.badges && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [badges, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/render_email_template200_response.rb b/client/lib/fastcomments-client/models/render_email_template200_response.rb deleted file mode 100644 index 0b5d57e..0000000 --- a/client/lib/fastcomments-client/models/render_email_template200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module RenderEmailTemplate200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'RenderEmailTemplateResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/render_email_template_body.rb b/client/lib/fastcomments-client/models/render_email_template_body.rb index 22d358e..66ecaeb 100644 --- a/client/lib/fastcomments-client/models/render_email_template_body.rb +++ b/client/lib/fastcomments-client/models/render_email_template_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class RenderEmailTemplateBody < ApiModelBase + class RenderEmailTemplateBody attr_accessor :email_template_id attr_accessor :ejs @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/render_email_template_response.rb b/client/lib/fastcomments-client/models/render_email_template_response.rb index 0928cd7..48786e5 100644 --- a/client/lib/fastcomments-client/models/render_email_template_response.rb +++ b/client/lib/fastcomments-client/models/render_email_template_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class RenderEmailTemplateResponse < ApiModelBase + class RenderEmailTemplateResponse attr_accessor :status attr_accessor :html @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/renderable_user_notification.rb b/client/lib/fastcomments-client/models/renderable_user_notification.rb index 7bb89e4..567474b 100644 --- a/client/lib/fastcomments-client/models/renderable_user_notification.rb +++ b/client/lib/fastcomments-client/models/renderable_user_notification.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class RenderableUserNotification < ApiModelBase + class RenderableUserNotification attr_accessor :conversation_id attr_accessor :context_html @@ -509,6 +509,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -525,6 +580,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/repeat_comment_check_ignored_reason.rb b/client/lib/fastcomments-client/models/repeat_comment_check_ignored_reason.rb index c0c963a..13f6f3c 100644 --- a/client/lib/fastcomments-client/models/repeat_comment_check_ignored_reason.rb +++ b/client/lib/fastcomments-client/models/repeat_comment_check_ignored_reason.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/repeat_comment_handling_action.rb b/client/lib/fastcomments-client/models/repeat_comment_handling_action.rb index 77415d4..aada1c9 100644 --- a/client/lib/fastcomments-client/models/repeat_comment_handling_action.rb +++ b/client/lib/fastcomments-client/models/repeat_comment_handling_action.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/replace_tenant_package_body.rb b/client/lib/fastcomments-client/models/replace_tenant_package_body.rb index 4c20eeb..27d914d 100644 --- a/client/lib/fastcomments-client/models/replace_tenant_package_body.rb +++ b/client/lib/fastcomments-client/models/replace_tenant_package_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class ReplaceTenantPackageBody < ApiModelBase + class ReplaceTenantPackageBody attr_accessor :name attr_accessor :monthly_cost_usd @@ -653,6 +653,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -669,6 +724,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/replace_tenant_user_body.rb b/client/lib/fastcomments-client/models/replace_tenant_user_body.rb index 7f86e99..674dfea 100644 --- a/client/lib/fastcomments-client/models/replace_tenant_user_body.rb +++ b/client/lib/fastcomments-client/models/replace_tenant_user_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class ReplaceTenantUserBody < ApiModelBase + class ReplaceTenantUserBody attr_accessor :username attr_accessor :email @@ -405,6 +405,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -421,6 +476,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/reset_user_notifications200_response.rb b/client/lib/fastcomments-client/models/reset_user_notifications200_response.rb deleted file mode 100644 index b677d3f..0000000 --- a/client/lib/fastcomments-client/models/reset_user_notifications200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module ResetUserNotifications200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'ResetUserNotificationsResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/reset_user_notifications_response.rb b/client/lib/fastcomments-client/models/reset_user_notifications_response.rb index a65655c..dd5f214 100644 --- a/client/lib/fastcomments-client/models/reset_user_notifications_response.rb +++ b/client/lib/fastcomments-client/models/reset_user_notifications_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class ResetUserNotificationsResponse < ApiModelBase + class ResetUserNotificationsResponse attr_accessor :status attr_accessor :code @@ -186,6 +186,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -202,6 +257,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/save_comment200_response.rb b/client/lib/fastcomments-client/models/save_comment200_response.rb deleted file mode 100644 index e226565..0000000 --- a/client/lib/fastcomments-client/models/save_comment200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module SaveComment200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'SaveCommentResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/save_comment_response_optimized.rb b/client/lib/fastcomments-client/models/save_comment_response_optimized.rb index 174e797..32e751d 100644 --- a/client/lib/fastcomments-client/models/save_comment_response_optimized.rb +++ b/client/lib/fastcomments-client/models/save_comment_response_optimized.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class SaveCommentResponseOptimized < ApiModelBase + class SaveCommentResponseOptimized attr_accessor :status attr_accessor :comment @@ -215,6 +215,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -231,6 +286,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/aggregate_question_results200_response.rb b/client/lib/fastcomments-client/models/save_comments_bulk_response.rb similarity index 94% rename from client/lib/fastcomments-client/models/aggregate_question_results200_response.rb rename to client/lib/fastcomments-client/models/save_comments_bulk_response.rb index 03c6552..b2f5827 100644 --- a/client/lib/fastcomments-client/models/aggregate_question_results200_response.rb +++ b/client/lib/fastcomments-client/models/save_comments_bulk_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,13 +14,13 @@ require 'time' module FastCommentsClient - module AggregateQuestionResults200Response + module SaveCommentsBulkResponse class << self # List of class defined in anyOf (OpenAPI v3) def openapi_any_of [ :'APIError', - :'AggregateQuestionResultsResponse' + :'APISaveCommentResponse' ] end @@ -37,7 +37,8 @@ def build(data) openapi_any_of.each do |klass| begin next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data rescue # rescue all errors so we keep iterating even if the current item lookup raises end end diff --git a/client/lib/fastcomments-client/models/save_comments_response_with_presence.rb b/client/lib/fastcomments-client/models/save_comments_response_with_presence.rb index a2486b0..007c1eb 100644 --- a/client/lib/fastcomments-client/models/save_comments_response_with_presence.rb +++ b/client/lib/fastcomments-client/models/save_comments_response_with_presence.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class SaveCommentsResponseWithPresence < ApiModelBase + class SaveCommentsResponseWithPresence attr_accessor :status attr_accessor :comment @@ -231,6 +231,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -247,6 +302,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/search_users_response.rb b/client/lib/fastcomments-client/models/search_users_response.rb index 29aa4c7..2ace7c1 100644 --- a/client/lib/fastcomments-client/models/search_users_response.rb +++ b/client/lib/fastcomments-client/models/search_users_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class SearchUsersResponse < ApiModelBase + class SearchUsersResponse attr_accessor :status attr_accessor :users @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/search_users200_response.rb b/client/lib/fastcomments-client/models/search_users_result.rb similarity index 95% rename from client/lib/fastcomments-client/models/search_users200_response.rb rename to client/lib/fastcomments-client/models/search_users_result.rb index ea604ac..687e26d 100644 --- a/client/lib/fastcomments-client/models/search_users200_response.rb +++ b/client/lib/fastcomments-client/models/search_users_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,12 +14,11 @@ require 'time' module FastCommentsClient - module SearchUsers200Response + module SearchUsersResult class << self # List of class defined in anyOf (OpenAPI v3) def openapi_any_of [ - :'APIError', :'SearchUsersResponse', :'SearchUsersSectionedResponse' ] @@ -38,7 +37,8 @@ def build(data) openapi_any_of.each do |klass| begin next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data rescue # rescue all errors so we keep iterating even if the current item lookup raises end end diff --git a/client/lib/fastcomments-client/models/search_users_sectioned_response.rb b/client/lib/fastcomments-client/models/search_users_sectioned_response.rb index 420b64f..fe56fb1 100644 --- a/client/lib/fastcomments-client/models/search_users_sectioned_response.rb +++ b/client/lib/fastcomments-client/models/search_users_sectioned_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class SearchUsersSectionedResponse < ApiModelBase + class SearchUsersSectionedResponse attr_accessor :status attr_accessor :sections @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/set_comment_approved_response.rb b/client/lib/fastcomments-client/models/set_comment_approved_response.rb new file mode 100644 index 0000000..e3fc57a --- /dev/null +++ b/client/lib/fastcomments-client/models/set_comment_approved_response.rb @@ -0,0 +1,268 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class SetCommentApprovedResponse + attr_accessor :did_reset_flagged_count + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'did_reset_flagged_count' => :'didResetFlaggedCount', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'did_reset_flagged_count' => :'Boolean', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::SetCommentApprovedResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::SetCommentApprovedResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'did_reset_flagged_count') + self.did_reset_flagged_count = attributes[:'did_reset_flagged_count'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + did_reset_flagged_count == o.did_reset_flagged_count && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [did_reset_flagged_count, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/set_comment_text200_response.rb b/client/lib/fastcomments-client/models/set_comment_text200_response.rb deleted file mode 100644 index fc77d60..0000000 --- a/client/lib/fastcomments-client/models/set_comment_text200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module SetCommentText200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'PublicAPISetCommentTextResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/set_comment_text_params.rb b/client/lib/fastcomments-client/models/set_comment_text_params.rb new file mode 100644 index 0000000..18b2e76 --- /dev/null +++ b/client/lib/fastcomments-client/models/set_comment_text_params.rb @@ -0,0 +1,237 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class SetCommentTextParams + attr_accessor :comment + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'comment' => :'comment' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'comment' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::SetCommentTextParams` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::SetCommentTextParams`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'comment') + self.comment = attributes[:'comment'] + else + self.comment = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @comment.nil? + invalid_properties.push('invalid value for "comment", comment cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @comment.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] comment Value to be assigned + def comment=(comment) + if comment.nil? + fail ArgumentError, 'comment cannot be nil' + end + + @comment = comment + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + comment == o.comment + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [comment].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/set_comment_text_response.rb b/client/lib/fastcomments-client/models/set_comment_text_response.rb new file mode 100644 index 0000000..6681c10 --- /dev/null +++ b/client/lib/fastcomments-client/models/set_comment_text_response.rb @@ -0,0 +1,285 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class SetCommentTextResponse + attr_accessor :new_comment_text_html + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'new_comment_text_html' => :'newCommentTextHTML', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'new_comment_text_html' => :'String', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::SetCommentTextResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::SetCommentTextResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'new_comment_text_html') + self.new_comment_text_html = attributes[:'new_comment_text_html'] + else + self.new_comment_text_html = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @new_comment_text_html.nil? + invalid_properties.push('invalid value for "new_comment_text_html", new_comment_text_html cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @new_comment_text_html.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] new_comment_text_html Value to be assigned + def new_comment_text_html=(new_comment_text_html) + if new_comment_text_html.nil? + fail ArgumentError, 'new_comment_text_html cannot be nil' + end + + @new_comment_text_html = new_comment_text_html + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + new_comment_text_html == o.new_comment_text_html && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [new_comment_text_html, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/set_comment_text_result.rb b/client/lib/fastcomments-client/models/set_comment_text_result.rb index 6887c3b..d798cd1 100644 --- a/client/lib/fastcomments-client/models/set_comment_text_result.rb +++ b/client/lib/fastcomments-client/models/set_comment_text_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class SetCommentTextResult < ApiModelBase + class SetCommentTextResult attr_accessor :approved attr_accessor :comment_html @@ -169,6 +169,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -185,6 +240,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/set_user_trust_factor_response.rb b/client/lib/fastcomments-client/models/set_user_trust_factor_response.rb new file mode 100644 index 0000000..7f04255 --- /dev/null +++ b/client/lib/fastcomments-client/models/set_user_trust_factor_response.rb @@ -0,0 +1,268 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class SetUserTrustFactorResponse + attr_accessor :previous_manual_trust_factor + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'previous_manual_trust_factor' => :'previousManualTrustFactor', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'previous_manual_trust_factor' => :'Float', + :'status' => :'APIStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::SetUserTrustFactorResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::SetUserTrustFactorResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'previous_manual_trust_factor') + self.previous_manual_trust_factor = attributes[:'previous_manual_trust_factor'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + previous_manual_trust_factor == o.previous_manual_trust_factor && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [previous_manual_trust_factor, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/size_preset.rb b/client/lib/fastcomments-client/models/size_preset.rb index 03d43fc..7f3c347 100644 --- a/client/lib/fastcomments-client/models/size_preset.rb +++ b/client/lib/fastcomments-client/models/size_preset.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/sort_directions.rb b/client/lib/fastcomments-client/models/sort_directions.rb index b5b215c..679728c 100644 --- a/client/lib/fastcomments-client/models/sort_directions.rb +++ b/client/lib/fastcomments-client/models/sort_directions.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/sortdir.rb b/client/lib/fastcomments-client/models/sortdir.rb index ad6f9f4..1a41d7c 100644 --- a/client/lib/fastcomments-client/models/sortdir.rb +++ b/client/lib/fastcomments-client/models/sortdir.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/spam_rule.rb b/client/lib/fastcomments-client/models/spam_rule.rb index 2be84b0..9a7fade 100644 --- a/client/lib/fastcomments-client/models/spam_rule.rb +++ b/client/lib/fastcomments-client/models/spam_rule.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class SpamRule < ApiModelBase + class SpamRule attr_accessor :actions attr_accessor :comment_contains @@ -166,6 +166,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -182,6 +237,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/sso_security_level.rb b/client/lib/fastcomments-client/models/sso_security_level.rb index 3ded53b..d8554be 100644 --- a/client/lib/fastcomments-client/models/sso_security_level.rb +++ b/client/lib/fastcomments-client/models/sso_security_level.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/tenant_badge.rb b/client/lib/fastcomments-client/models/tenant_badge.rb new file mode 100644 index 0000000..91f87bb --- /dev/null +++ b/client/lib/fastcomments-client/models/tenant_badge.rb @@ -0,0 +1,637 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class TenantBadge + attr_accessor :_id + + attr_accessor :tenant_id + + attr_accessor :created_by_user_id + + attr_accessor :created_at + + attr_accessor :enabled + + attr_accessor :url_id + + attr_accessor :type + + attr_accessor :threshold + + attr_accessor :uses + + attr_accessor :name + + attr_accessor :description + + attr_accessor :display_label + + attr_accessor :display_src + + attr_accessor :background_color + + attr_accessor :border_color + + attr_accessor :text_color + + attr_accessor :css_class + + attr_accessor :veteran_user_threshold_millis + + attr_accessor :is_awaiting_reprocess + + attr_accessor :is_awaiting_deletion + + attr_accessor :replaces_badge_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_id' => :'_id', + :'tenant_id' => :'tenantId', + :'created_by_user_id' => :'createdByUserId', + :'created_at' => :'createdAt', + :'enabled' => :'enabled', + :'url_id' => :'urlId', + :'type' => :'type', + :'threshold' => :'threshold', + :'uses' => :'uses', + :'name' => :'name', + :'description' => :'description', + :'display_label' => :'displayLabel', + :'display_src' => :'displaySrc', + :'background_color' => :'backgroundColor', + :'border_color' => :'borderColor', + :'text_color' => :'textColor', + :'css_class' => :'cssClass', + :'veteran_user_threshold_millis' => :'veteranUserThresholdMillis', + :'is_awaiting_reprocess' => :'isAwaitingReprocess', + :'is_awaiting_deletion' => :'isAwaitingDeletion', + :'replaces_badge_id' => :'replacesBadgeId' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'_id' => :'String', + :'tenant_id' => :'String', + :'created_by_user_id' => :'String', + :'created_at' => :'Time', + :'enabled' => :'Boolean', + :'url_id' => :'String', + :'type' => :'Float', + :'threshold' => :'Float', + :'uses' => :'Float', + :'name' => :'String', + :'description' => :'String', + :'display_label' => :'String', + :'display_src' => :'String', + :'background_color' => :'String', + :'border_color' => :'String', + :'text_color' => :'String', + :'css_class' => :'String', + :'veteran_user_threshold_millis' => :'Float', + :'is_awaiting_reprocess' => :'Boolean', + :'is_awaiting_deletion' => :'Boolean', + :'replaces_badge_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'url_id', + :'display_src', + :'background_color', + :'border_color', + :'text_color', + :'css_class', + :'veteran_user_threshold_millis', + :'replaces_badge_id' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::TenantBadge` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::TenantBadge`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'_id') + self._id = attributes[:'_id'] + else + self._id = nil + end + + if attributes.key?(:'tenant_id') + self.tenant_id = attributes[:'tenant_id'] + else + self.tenant_id = nil + end + + if attributes.key?(:'created_by_user_id') + self.created_by_user_id = attributes[:'created_by_user_id'] + else + self.created_by_user_id = nil + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + else + self.created_at = nil + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + else + self.enabled = nil + end + + if attributes.key?(:'url_id') + self.url_id = attributes[:'url_id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + else + self.type = nil + end + + if attributes.key?(:'threshold') + self.threshold = attributes[:'threshold'] + else + self.threshold = nil + end + + if attributes.key?(:'uses') + self.uses = attributes[:'uses'] + else + self.uses = nil + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + else + self.description = nil + end + + if attributes.key?(:'display_label') + self.display_label = attributes[:'display_label'] + else + self.display_label = nil + end + + if attributes.key?(:'display_src') + self.display_src = attributes[:'display_src'] + else + self.display_src = nil + end + + if attributes.key?(:'background_color') + self.background_color = attributes[:'background_color'] + else + self.background_color = nil + end + + if attributes.key?(:'border_color') + self.border_color = attributes[:'border_color'] + else + self.border_color = nil + end + + if attributes.key?(:'text_color') + self.text_color = attributes[:'text_color'] + else + self.text_color = nil + end + + if attributes.key?(:'css_class') + self.css_class = attributes[:'css_class'] + end + + if attributes.key?(:'veteran_user_threshold_millis') + self.veteran_user_threshold_millis = attributes[:'veteran_user_threshold_millis'] + end + + if attributes.key?(:'is_awaiting_reprocess') + self.is_awaiting_reprocess = attributes[:'is_awaiting_reprocess'] + else + self.is_awaiting_reprocess = nil + end + + if attributes.key?(:'is_awaiting_deletion') + self.is_awaiting_deletion = attributes[:'is_awaiting_deletion'] + else + self.is_awaiting_deletion = nil + end + + if attributes.key?(:'replaces_badge_id') + self.replaces_badge_id = attributes[:'replaces_badge_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @_id.nil? + invalid_properties.push('invalid value for "_id", _id cannot be nil.') + end + + if @tenant_id.nil? + invalid_properties.push('invalid value for "tenant_id", tenant_id cannot be nil.') + end + + if @created_by_user_id.nil? + invalid_properties.push('invalid value for "created_by_user_id", created_by_user_id cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @enabled.nil? + invalid_properties.push('invalid value for "enabled", enabled cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @threshold.nil? + invalid_properties.push('invalid value for "threshold", threshold cannot be nil.') + end + + if @uses.nil? + invalid_properties.push('invalid value for "uses", uses cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @display_label.nil? + invalid_properties.push('invalid value for "display_label", display_label cannot be nil.') + end + + if @is_awaiting_reprocess.nil? + invalid_properties.push('invalid value for "is_awaiting_reprocess", is_awaiting_reprocess cannot be nil.') + end + + if @is_awaiting_deletion.nil? + invalid_properties.push('invalid value for "is_awaiting_deletion", is_awaiting_deletion cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @_id.nil? + return false if @tenant_id.nil? + return false if @created_by_user_id.nil? + return false if @created_at.nil? + return false if @enabled.nil? + return false if @type.nil? + return false if @threshold.nil? + return false if @uses.nil? + return false if @name.nil? + return false if @description.nil? + return false if @display_label.nil? + return false if @is_awaiting_reprocess.nil? + return false if @is_awaiting_deletion.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] _id Value to be assigned + def _id=(_id) + if _id.nil? + fail ArgumentError, '_id cannot be nil' + end + + @_id = _id + end + + # Custom attribute writer method with validation + # @param [Object] tenant_id Value to be assigned + def tenant_id=(tenant_id) + if tenant_id.nil? + fail ArgumentError, 'tenant_id cannot be nil' + end + + @tenant_id = tenant_id + end + + # Custom attribute writer method with validation + # @param [Object] created_by_user_id Value to be assigned + def created_by_user_id=(created_by_user_id) + if created_by_user_id.nil? + fail ArgumentError, 'created_by_user_id cannot be nil' + end + + @created_by_user_id = created_by_user_id + end + + # Custom attribute writer method with validation + # @param [Object] created_at Value to be assigned + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'created_at cannot be nil' + end + + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param [Object] enabled Value to be assigned + def enabled=(enabled) + if enabled.nil? + fail ArgumentError, 'enabled cannot be nil' + end + + @enabled = enabled + end + + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] threshold Value to be assigned + def threshold=(threshold) + if threshold.nil? + fail ArgumentError, 'threshold cannot be nil' + end + + @threshold = threshold + end + + # Custom attribute writer method with validation + # @param [Object] uses Value to be assigned + def uses=(uses) + if uses.nil? + fail ArgumentError, 'uses cannot be nil' + end + + @uses = uses + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] description Value to be assigned + def description=(description) + if description.nil? + fail ArgumentError, 'description cannot be nil' + end + + @description = description + end + + # Custom attribute writer method with validation + # @param [Object] display_label Value to be assigned + def display_label=(display_label) + if display_label.nil? + fail ArgumentError, 'display_label cannot be nil' + end + + @display_label = display_label + end + + # Custom attribute writer method with validation + # @param [Object] is_awaiting_reprocess Value to be assigned + def is_awaiting_reprocess=(is_awaiting_reprocess) + if is_awaiting_reprocess.nil? + fail ArgumentError, 'is_awaiting_reprocess cannot be nil' + end + + @is_awaiting_reprocess = is_awaiting_reprocess + end + + # Custom attribute writer method with validation + # @param [Object] is_awaiting_deletion Value to be assigned + def is_awaiting_deletion=(is_awaiting_deletion) + if is_awaiting_deletion.nil? + fail ArgumentError, 'is_awaiting_deletion cannot be nil' + end + + @is_awaiting_deletion = is_awaiting_deletion + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _id == o._id && + tenant_id == o.tenant_id && + created_by_user_id == o.created_by_user_id && + created_at == o.created_at && + enabled == o.enabled && + url_id == o.url_id && + type == o.type && + threshold == o.threshold && + uses == o.uses && + name == o.name && + description == o.description && + display_label == o.display_label && + display_src == o.display_src && + background_color == o.background_color && + border_color == o.border_color && + text_color == o.text_color && + css_class == o.css_class && + veteran_user_threshold_millis == o.veteran_user_threshold_millis && + is_awaiting_reprocess == o.is_awaiting_reprocess && + is_awaiting_deletion == o.is_awaiting_deletion && + replaces_badge_id == o.replaces_badge_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [_id, tenant_id, created_by_user_id, created_at, enabled, url_id, type, threshold, uses, name, description, display_label, display_src, background_color, border_color, text_color, css_class, veteran_user_threshold_millis, is_awaiting_reprocess, is_awaiting_deletion, replaces_badge_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/client/lib/fastcomments-client/models/tenant_hash_tag.rb b/client/lib/fastcomments-client/models/tenant_hash_tag.rb index b23edb9..efdb21c 100644 --- a/client/lib/fastcomments-client/models/tenant_hash_tag.rb +++ b/client/lib/fastcomments-client/models/tenant_hash_tag.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class TenantHashTag < ApiModelBase + class TenantHashTag attr_accessor :_id attr_accessor :created_at @@ -230,6 +230,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -246,6 +301,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/tenant_package.rb b/client/lib/fastcomments-client/models/tenant_package.rb index e6a30ec..433abb2 100644 --- a/client/lib/fastcomments-client/models/tenant_package.rb +++ b/client/lib/fastcomments-client/models/tenant_package.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class TenantPackage < ApiModelBase + class TenantPackage attr_accessor :_id attr_accessor :name @@ -23,6 +23,8 @@ class TenantPackage < ApiModelBase attr_accessor :created_at + attr_accessor :template_id + attr_accessor :monthly_cost_usd attr_accessor :yearly_cost_usd @@ -109,6 +111,10 @@ class TenantPackage < ApiModelBase attr_accessor :flex_chat_gpt_unit + attr_accessor :flex_llm_cost_cents + + attr_accessor :flex_llm_unit + attr_accessor :flex_minimum_cost_cents attr_accessor :flex_managed_tenant_cost_cents @@ -123,6 +129,14 @@ class TenantPackage < ApiModelBase attr_accessor :is_sso_billing_monthly_active_users + attr_accessor :has_ai_agents + + attr_accessor :max_ai_agents + + attr_accessor :ai_agent_daily_budget_cents + + attr_accessor :ai_agent_monthly_budget_cents + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -130,6 +144,7 @@ def self.attribute_map :'name' => :'name', :'tenant_id' => :'tenantId', :'created_at' => :'createdAt', + :'template_id' => :'templateId', :'monthly_cost_usd' => :'monthlyCostUSD', :'yearly_cost_usd' => :'yearlyCostUSD', :'monthly_stripe_plan_id' => :'monthlyStripePlanId', @@ -173,13 +188,19 @@ def self.attribute_map :'flex_domain_unit' => :'flexDomainUnit', :'flex_chat_gpt_cost_cents' => :'flexChatGPTCostCents', :'flex_chat_gpt_unit' => :'flexChatGPTUnit', + :'flex_llm_cost_cents' => :'flexLLMCostCents', + :'flex_llm_unit' => :'flexLLMUnit', :'flex_minimum_cost_cents' => :'flexMinimumCostCents', :'flex_managed_tenant_cost_cents' => :'flexManagedTenantCostCents', :'flex_sso_admin_cost_cents' => :'flexSSOAdminCostCents', :'flex_sso_admin_unit' => :'flexSSOAdminUnit', :'flex_sso_moderator_cost_cents' => :'flexSSOModeratorCostCents', :'flex_sso_moderator_unit' => :'flexSSOModeratorUnit', - :'is_sso_billing_monthly_active_users' => :'isSSOBillingMonthlyActiveUsers' + :'is_sso_billing_monthly_active_users' => :'isSSOBillingMonthlyActiveUsers', + :'has_ai_agents' => :'hasAIAgents', + :'max_ai_agents' => :'maxAIAgents', + :'ai_agent_daily_budget_cents' => :'aiAgentDailyBudgetCents', + :'ai_agent_monthly_budget_cents' => :'aiAgentMonthlyBudgetCents' } end @@ -200,6 +221,7 @@ def self.openapi_types :'name' => :'String', :'tenant_id' => :'String', :'created_at' => :'Time', + :'template_id' => :'String', :'monthly_cost_usd' => :'Float', :'yearly_cost_usd' => :'Float', :'monthly_stripe_plan_id' => :'String', @@ -243,13 +265,19 @@ def self.openapi_types :'flex_domain_unit' => :'Float', :'flex_chat_gpt_cost_cents' => :'Float', :'flex_chat_gpt_unit' => :'Float', + :'flex_llm_cost_cents' => :'Float', + :'flex_llm_unit' => :'Float', :'flex_minimum_cost_cents' => :'Float', :'flex_managed_tenant_cost_cents' => :'Float', :'flex_sso_admin_cost_cents' => :'Float', :'flex_sso_admin_unit' => :'Float', :'flex_sso_moderator_cost_cents' => :'Float', :'flex_sso_moderator_unit' => :'Float', - :'is_sso_billing_monthly_active_users' => :'Boolean' + :'is_sso_billing_monthly_active_users' => :'Boolean', + :'has_ai_agents' => :'Boolean', + :'max_ai_agents' => :'Float', + :'ai_agent_daily_budget_cents' => :'Float', + :'ai_agent_monthly_budget_cents' => :'Float' } end @@ -303,6 +331,10 @@ def initialize(attributes = {}) self.created_at = nil end + if attributes.key?(:'template_id') + self.template_id = attributes[:'template_id'] + end + if attributes.key?(:'monthly_cost_usd') self.monthly_cost_usd = attributes[:'monthly_cost_usd'] else @@ -523,6 +555,14 @@ def initialize(attributes = {}) self.flex_chat_gpt_unit = attributes[:'flex_chat_gpt_unit'] end + if attributes.key?(:'flex_llm_cost_cents') + self.flex_llm_cost_cents = attributes[:'flex_llm_cost_cents'] + end + + if attributes.key?(:'flex_llm_unit') + self.flex_llm_unit = attributes[:'flex_llm_unit'] + end + if attributes.key?(:'flex_minimum_cost_cents') self.flex_minimum_cost_cents = attributes[:'flex_minimum_cost_cents'] end @@ -550,6 +590,22 @@ def initialize(attributes = {}) if attributes.key?(:'is_sso_billing_monthly_active_users') self.is_sso_billing_monthly_active_users = attributes[:'is_sso_billing_monthly_active_users'] end + + if attributes.key?(:'has_ai_agents') + self.has_ai_agents = attributes[:'has_ai_agents'] + end + + if attributes.key?(:'max_ai_agents') + self.max_ai_agents = attributes[:'max_ai_agents'] + end + + if attributes.key?(:'ai_agent_daily_budget_cents') + self.ai_agent_daily_budget_cents = attributes[:'ai_agent_daily_budget_cents'] + end + + if attributes.key?(:'ai_agent_monthly_budget_cents') + self.ai_agent_monthly_budget_cents = attributes[:'ai_agent_monthly_budget_cents'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -921,6 +977,7 @@ def ==(o) name == o.name && tenant_id == o.tenant_id && created_at == o.created_at && + template_id == o.template_id && monthly_cost_usd == o.monthly_cost_usd && yearly_cost_usd == o.yearly_cost_usd && monthly_stripe_plan_id == o.monthly_stripe_plan_id && @@ -964,13 +1021,19 @@ def ==(o) flex_domain_unit == o.flex_domain_unit && flex_chat_gpt_cost_cents == o.flex_chat_gpt_cost_cents && flex_chat_gpt_unit == o.flex_chat_gpt_unit && + flex_llm_cost_cents == o.flex_llm_cost_cents && + flex_llm_unit == o.flex_llm_unit && flex_minimum_cost_cents == o.flex_minimum_cost_cents && flex_managed_tenant_cost_cents == o.flex_managed_tenant_cost_cents && flex_sso_admin_cost_cents == o.flex_sso_admin_cost_cents && flex_sso_admin_unit == o.flex_sso_admin_unit && flex_sso_moderator_cost_cents == o.flex_sso_moderator_cost_cents && flex_sso_moderator_unit == o.flex_sso_moderator_unit && - is_sso_billing_monthly_active_users == o.is_sso_billing_monthly_active_users + is_sso_billing_monthly_active_users == o.is_sso_billing_monthly_active_users && + has_ai_agents == o.has_ai_agents && + max_ai_agents == o.max_ai_agents && + ai_agent_daily_budget_cents == o.ai_agent_daily_budget_cents && + ai_agent_monthly_budget_cents == o.ai_agent_monthly_budget_cents end # @see the `==` method @@ -982,7 +1045,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [_id, name, tenant_id, created_at, monthly_cost_usd, yearly_cost_usd, monthly_stripe_plan_id, yearly_stripe_plan_id, max_monthly_page_loads, max_monthly_api_credits, max_monthly_small_widgets_credits, max_monthly_comments, max_concurrent_users, max_tenant_users, max_sso_users, max_moderators, max_domains, max_white_labeled_tenants, max_monthly_event_log_requests, max_custom_collection_size, has_white_labeling, has_debranding, has_llm_spam_detection, for_who_text, feature_taglines, has_auditing, has_flex_pricing, enable_saml, enable_canvas_lti, flex_page_load_cost_cents, flex_page_load_unit, flex_comment_cost_cents, flex_comment_unit, flex_sso_user_cost_cents, flex_sso_user_unit, flex_api_credit_cost_cents, flex_api_credit_unit, flex_small_widgets_credit_cost_cents, flex_small_widgets_credit_unit, flex_moderator_cost_cents, flex_moderator_unit, flex_admin_cost_cents, flex_admin_unit, flex_domain_cost_cents, flex_domain_unit, flex_chat_gpt_cost_cents, flex_chat_gpt_unit, flex_minimum_cost_cents, flex_managed_tenant_cost_cents, flex_sso_admin_cost_cents, flex_sso_admin_unit, flex_sso_moderator_cost_cents, flex_sso_moderator_unit, is_sso_billing_monthly_active_users].hash + [_id, name, tenant_id, created_at, template_id, monthly_cost_usd, yearly_cost_usd, monthly_stripe_plan_id, yearly_stripe_plan_id, max_monthly_page_loads, max_monthly_api_credits, max_monthly_small_widgets_credits, max_monthly_comments, max_concurrent_users, max_tenant_users, max_sso_users, max_moderators, max_domains, max_white_labeled_tenants, max_monthly_event_log_requests, max_custom_collection_size, has_white_labeling, has_debranding, has_llm_spam_detection, for_who_text, feature_taglines, has_auditing, has_flex_pricing, enable_saml, enable_canvas_lti, flex_page_load_cost_cents, flex_page_load_unit, flex_comment_cost_cents, flex_comment_unit, flex_sso_user_cost_cents, flex_sso_user_unit, flex_api_credit_cost_cents, flex_api_credit_unit, flex_small_widgets_credit_cost_cents, flex_small_widgets_credit_unit, flex_moderator_cost_cents, flex_moderator_unit, flex_admin_cost_cents, flex_admin_unit, flex_domain_cost_cents, flex_domain_unit, flex_chat_gpt_cost_cents, flex_chat_gpt_unit, flex_llm_cost_cents, flex_llm_unit, flex_minimum_cost_cents, flex_managed_tenant_cost_cents, flex_sso_admin_cost_cents, flex_sso_admin_unit, flex_sso_moderator_cost_cents, flex_sso_moderator_unit, is_sso_billing_monthly_active_users, has_ai_agents, max_ai_agents, ai_agent_daily_budget_cents, ai_agent_monthly_budget_cents].hash end # Builds the object from hash @@ -1008,6 +1071,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -1024,6 +1142,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/tos_config.rb b/client/lib/fastcomments-client/models/tos_config.rb index 90bf070..87543eb 100644 --- a/client/lib/fastcomments-client/models/tos_config.rb +++ b/client/lib/fastcomments-client/models/tos_config.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class TOSConfig < ApiModelBase + class TOSConfig attr_accessor :enabled # Construct a type with a set of properties K of type T @@ -147,6 +147,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -163,6 +218,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/un_block_comment_public200_response.rb b/client/lib/fastcomments-client/models/un_block_comment_public200_response.rb deleted file mode 100644 index d24fd69..0000000 --- a/client/lib/fastcomments-client/models/un_block_comment_public200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module UnBlockCommentPublic200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'UnblockSuccess' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/un_block_from_comment_params.rb b/client/lib/fastcomments-client/models/un_block_from_comment_params.rb index 3334ea0..29362cf 100644 --- a/client/lib/fastcomments-client/models/un_block_from_comment_params.rb +++ b/client/lib/fastcomments-client/models/un_block_from_comment_params.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UnBlockFromCommentParams < ApiModelBase + class UnBlockFromCommentParams attr_accessor :comment_ids_to_check # Attribute mapping from ruby-style variable name to JSON key. @@ -128,6 +128,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -144,6 +199,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/unblock_success.rb b/client/lib/fastcomments-client/models/unblock_success.rb index a4aea6d..a43a676 100644 --- a/client/lib/fastcomments-client/models/unblock_success.rb +++ b/client/lib/fastcomments-client/models/unblock_success.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UnblockSuccess < ApiModelBase + class UnblockSuccess attr_accessor :status # Construct a type with a set of properties K of type T @@ -194,6 +194,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -210,6 +265,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/updatable_comment_params.rb b/client/lib/fastcomments-client/models/updatable_comment_params.rb index a9c4ba6..516cced 100644 --- a/client/lib/fastcomments-client/models/updatable_comment_params.rb +++ b/client/lib/fastcomments-client/models/updatable_comment_params.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdatableCommentParams < ApiModelBase + class UpdatableCommentParams attr_accessor :url_id attr_accessor :url_id_raw @@ -493,6 +493,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -509,6 +564,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_api_page_data.rb b/client/lib/fastcomments-client/models/update_api_page_data.rb index 16f4435..933fb32 100644 --- a/client/lib/fastcomments-client/models/update_api_page_data.rb +++ b/client/lib/fastcomments-client/models/update_api_page_data.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdateAPIPageData < ApiModelBase + class UpdateAPIPageData attr_accessor :is_closed attr_accessor :accessible_by_group_ids @@ -164,6 +164,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -180,6 +235,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_api_user_subscription_data.rb b/client/lib/fastcomments-client/models/update_api_user_subscription_data.rb index 9dd3b5b..ab049a1 100644 --- a/client/lib/fastcomments-client/models/update_api_user_subscription_data.rb +++ b/client/lib/fastcomments-client/models/update_api_user_subscription_data.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdateAPIUserSubscriptionData < ApiModelBase + class UpdateAPIUserSubscriptionData attr_accessor :notification_frequency # Attribute mapping from ruby-style variable name to JSON key. @@ -126,6 +126,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -142,6 +197,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_apisso_user_data.rb b/client/lib/fastcomments-client/models/update_apisso_user_data.rb index 7869a1e..22baec5 100644 --- a/client/lib/fastcomments-client/models/update_apisso_user_data.rb +++ b/client/lib/fastcomments-client/models/update_apisso_user_data.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdateAPISSOUserData < ApiModelBase + class UpdateAPISSOUserData attr_accessor :group_ids attr_accessor :has_blocked_users @@ -299,6 +299,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -315,6 +370,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_domain_config_params.rb b/client/lib/fastcomments-client/models/update_domain_config_params.rb index 1ad5be0..3bc959e 100644 --- a/client/lib/fastcomments-client/models/update_domain_config_params.rb +++ b/client/lib/fastcomments-client/models/update_domain_config_params.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdateDomainConfigParams < ApiModelBase + class UpdateDomainConfigParams attr_accessor :domain attr_accessor :email_from_name @@ -200,6 +200,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -216,6 +271,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_email_template_body.rb b/client/lib/fastcomments-client/models/update_email_template_body.rb index 3c7cde5..f258b4f 100644 --- a/client/lib/fastcomments-client/models/update_email_template_body.rb +++ b/client/lib/fastcomments-client/models/update_email_template_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdateEmailTemplateBody < ApiModelBase + class UpdateEmailTemplateBody attr_accessor :email_template_id attr_accessor :display_name @@ -177,6 +177,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -193,6 +248,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_feed_post_params.rb b/client/lib/fastcomments-client/models/update_feed_post_params.rb index 2f2e5d6..c29538a 100644 --- a/client/lib/fastcomments-client/models/update_feed_post_params.rb +++ b/client/lib/fastcomments-client/models/update_feed_post_params.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdateFeedPostParams < ApiModelBase + class UpdateFeedPostParams attr_accessor :title attr_accessor :content_html @@ -180,6 +180,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -196,6 +251,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_hash_tag_body.rb b/client/lib/fastcomments-client/models/update_hash_tag_body.rb index 09a3c76..2ca3168 100644 --- a/client/lib/fastcomments-client/models/update_hash_tag_body.rb +++ b/client/lib/fastcomments-client/models/update_hash_tag_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdateHashTagBody < ApiModelBase + class UpdateHashTagBody attr_accessor :tenant_id attr_accessor :url @@ -144,6 +144,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -160,6 +215,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_hash_tag_response.rb b/client/lib/fastcomments-client/models/update_hash_tag_response.rb index c7ed9f0..5ef68f3 100644 --- a/client/lib/fastcomments-client/models/update_hash_tag_response.rb +++ b/client/lib/fastcomments-client/models/update_hash_tag_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdateHashTagResponse < ApiModelBase + class UpdateHashTagResponse attr_accessor :status attr_accessor :hash_tag @@ -191,6 +191,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -207,6 +262,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_moderator_body.rb b/client/lib/fastcomments-client/models/update_moderator_body.rb index cc0f0bf..5a60b99 100644 --- a/client/lib/fastcomments-client/models/update_moderator_body.rb +++ b/client/lib/fastcomments-client/models/update_moderator_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdateModeratorBody < ApiModelBase + class UpdateModeratorBody attr_accessor :name attr_accessor :email @@ -155,6 +155,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -171,6 +226,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_notification_body.rb b/client/lib/fastcomments-client/models/update_notification_body.rb index ed34543..f991239 100644 --- a/client/lib/fastcomments-client/models/update_notification_body.rb +++ b/client/lib/fastcomments-client/models/update_notification_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdateNotificationBody < ApiModelBase + class UpdateNotificationBody attr_accessor :viewed attr_accessor :opted_out @@ -135,6 +135,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -151,6 +206,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_question_config_body.rb b/client/lib/fastcomments-client/models/update_question_config_body.rb index 26f335f..c93f35e 100644 --- a/client/lib/fastcomments-client/models/update_question_config_body.rb +++ b/client/lib/fastcomments-client/models/update_question_config_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdateQuestionConfigBody < ApiModelBase + class UpdateQuestionConfigBody attr_accessor :name attr_accessor :question @@ -247,6 +247,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -263,6 +318,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_question_result_body.rb b/client/lib/fastcomments-client/models/update_question_result_body.rb index 34c0900..093b45c 100644 --- a/client/lib/fastcomments-client/models/update_question_result_body.rb +++ b/client/lib/fastcomments-client/models/update_question_result_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdateQuestionResultBody < ApiModelBase + class UpdateQuestionResultBody attr_accessor :url_id attr_accessor :anon_user_id @@ -183,6 +183,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -199,6 +254,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_subscription_api_response.rb b/client/lib/fastcomments-client/models/update_subscription_api_response.rb index 6469eec..7ad4d6a 100644 --- a/client/lib/fastcomments-client/models/update_subscription_api_response.rb +++ b/client/lib/fastcomments-client/models/update_subscription_api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdateSubscriptionAPIResponse < ApiModelBase + class UpdateSubscriptionAPIResponse attr_accessor :reason attr_accessor :code @@ -170,6 +170,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -186,6 +241,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_tenant_body.rb b/client/lib/fastcomments-client/models/update_tenant_body.rb index 62e6c9f..792d2bf 100644 --- a/client/lib/fastcomments-client/models/update_tenant_body.rb +++ b/client/lib/fastcomments-client/models/update_tenant_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdateTenantBody < ApiModelBase + class UpdateTenantBody attr_accessor :name attr_accessor :email @@ -338,6 +338,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -354,6 +409,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_tenant_package_body.rb b/client/lib/fastcomments-client/models/update_tenant_package_body.rb index c21588e..b23ead9 100644 --- a/client/lib/fastcomments-client/models/update_tenant_package_body.rb +++ b/client/lib/fastcomments-client/models/update_tenant_package_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdateTenantPackageBody < ApiModelBase + class UpdateTenantPackageBody attr_accessor :name attr_accessor :monthly_cost_usd @@ -407,6 +407,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -423,6 +478,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_tenant_user_body.rb b/client/lib/fastcomments-client/models/update_tenant_user_body.rb index 0563e72..55b487e 100644 --- a/client/lib/fastcomments-client/models/update_tenant_user_body.rb +++ b/client/lib/fastcomments-client/models/update_tenant_user_body.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdateTenantUserBody < ApiModelBase + class UpdateTenantUserBody attr_accessor :username attr_accessor :display_name @@ -335,6 +335,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -351,6 +406,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_user_badge200_response.rb b/client/lib/fastcomments-client/models/update_user_badge200_response.rb deleted file mode 100644 index 2e92875..0000000 --- a/client/lib/fastcomments-client/models/update_user_badge200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module UpdateUserBadge200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIEmptySuccessResponse', - :'APIError' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/update_user_badge_params.rb b/client/lib/fastcomments-client/models/update_user_badge_params.rb index b0ff5e0..87ede92 100644 --- a/client/lib/fastcomments-client/models/update_user_badge_params.rb +++ b/client/lib/fastcomments-client/models/update_user_badge_params.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UpdateUserBadgeParams < ApiModelBase + class UpdateUserBadgeParams attr_accessor :displayed_on_comments # Attribute mapping from ruby-style variable name to JSON key. @@ -126,6 +126,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -142,6 +197,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/update_user_notification_comment_subscription_status_response.rb b/client/lib/fastcomments-client/models/update_user_notification_comment_subscription_status_response.rb new file mode 100644 index 0000000..e3a5552 --- /dev/null +++ b/client/lib/fastcomments-client/models/update_user_notification_comment_subscription_status_response.rb @@ -0,0 +1,104 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + module UpdateUserNotificationCommentSubscriptionStatusResponse + class << self + # List of class defined in anyOf (OpenAPI v3) + def openapi_any_of + [ + :'IgnoredResponse', + :'UserNotificationWriteResponse' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of anyOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of anyOf items and attempt to identify the appropriate one. + # Note: + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_any_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_any_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass, data) + return if data.nil? + + case klass.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.iso8601(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type, item) } + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } + end + else # model + const = FastCommentsClient.const_get(klass) + if const + if const.respond_to?(:openapi_any_of) # nested anyOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue + raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" + end + end + end + +end diff --git a/client/lib/fastcomments-client/models/update_user_notification_page_subscription_status_response.rb b/client/lib/fastcomments-client/models/update_user_notification_page_subscription_status_response.rb new file mode 100644 index 0000000..44de180 --- /dev/null +++ b/client/lib/fastcomments-client/models/update_user_notification_page_subscription_status_response.rb @@ -0,0 +1,104 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + module UpdateUserNotificationPageSubscriptionStatusResponse + class << self + # List of class defined in anyOf (OpenAPI v3) + def openapi_any_of + [ + :'IgnoredResponse', + :'UserNotificationWriteResponse' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of anyOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of anyOf items and attempt to identify the appropriate one. + # Note: + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_any_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_any_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass, data) + return if data.nil? + + case klass.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.iso8601(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type, item) } + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } + end + else # model + const = FastCommentsClient.const_get(klass) + if const + if const.respond_to?(:openapi_any_of) # nested anyOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue + raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" + end + end + end + +end diff --git a/client/lib/fastcomments-client/models/update_user_notification_status200_response.rb b/client/lib/fastcomments-client/models/update_user_notification_status_response.rb similarity index 95% rename from client/lib/fastcomments-client/models/update_user_notification_status200_response.rb rename to client/lib/fastcomments-client/models/update_user_notification_status_response.rb index eb50f4e..32fbfd2 100644 --- a/client/lib/fastcomments-client/models/update_user_notification_status200_response.rb +++ b/client/lib/fastcomments-client/models/update_user_notification_status_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,12 +14,11 @@ require 'time' module FastCommentsClient - module UpdateUserNotificationStatus200Response + module UpdateUserNotificationStatusResponse class << self # List of class defined in anyOf (OpenAPI v3) def openapi_any_of [ - :'APIError', :'IgnoredResponse', :'UserNotificationWriteResponse' ] @@ -38,7 +37,8 @@ def build(data) openapi_any_of.each do |klass| begin next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data rescue # rescue all errors so we keep iterating even if the current item lookup raises end end diff --git a/client/lib/fastcomments-client/models/upload_image_response.rb b/client/lib/fastcomments-client/models/upload_image_response.rb index 768b3e1..aef1a4e 100644 --- a/client/lib/fastcomments-client/models/upload_image_response.rb +++ b/client/lib/fastcomments-client/models/upload_image_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UploadImageResponse < ApiModelBase + class UploadImageResponse attr_accessor :status attr_accessor :url @@ -203,6 +203,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -219,6 +274,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/user.rb b/client/lib/fastcomments-client/models/user.rb index af598e5..f744084 100644 --- a/client/lib/fastcomments-client/models/user.rb +++ b/client/lib/fastcomments-client/models/user.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class User < ApiModelBase + class User attr_accessor :_id attr_accessor :tenant_id @@ -93,6 +93,8 @@ class User < ApiModelBase attr_accessor :admin_notification_frequency + attr_accessor :agent_approval_notification_frequency + attr_accessor :last_tenant_notification_sent_date attr_accessor :last_reply_notification_sent_date @@ -197,6 +199,7 @@ def self.attribute_map :'digest_email_frequency' => :'digestEmailFrequency', :'notification_frequency' => :'notificationFrequency', :'admin_notification_frequency' => :'adminNotificationFrequency', + :'agent_approval_notification_frequency' => :'agentApprovalNotificationFrequency', :'last_tenant_notification_sent_date' => :'lastTenantNotificationSentDate', :'last_reply_notification_sent_date' => :'lastReplyNotificationSentDate', :'ignored_add_to_my_site_messages' => :'ignoredAddToMySiteMessages', @@ -272,6 +275,7 @@ def self.openapi_types :'digest_email_frequency' => :'DigestEmailFrequency', :'notification_frequency' => :'Float', :'admin_notification_frequency' => :'Float', + :'agent_approval_notification_frequency' => :'ImportedAgentApprovalNotificationFrequency', :'last_tenant_notification_sent_date' => :'Time', :'last_reply_notification_sent_date' => :'Time', :'ignored_add_to_my_site_messages' => :'Boolean', @@ -500,6 +504,10 @@ def initialize(attributes = {}) self.admin_notification_frequency = attributes[:'admin_notification_frequency'] end + if attributes.key?(:'agent_approval_notification_frequency') + self.agent_approval_notification_frequency = attributes[:'agent_approval_notification_frequency'] + end + if attributes.key?(:'last_tenant_notification_sent_date') self.last_tenant_notification_sent_date = attributes[:'last_tenant_notification_sent_date'] end @@ -747,6 +755,7 @@ def ==(o) digest_email_frequency == o.digest_email_frequency && notification_frequency == o.notification_frequency && admin_notification_frequency == o.admin_notification_frequency && + agent_approval_notification_frequency == o.agent_approval_notification_frequency && last_tenant_notification_sent_date == o.last_tenant_notification_sent_date && last_reply_notification_sent_date == o.last_reply_notification_sent_date && ignored_add_to_my_site_messages == o.ignored_add_to_my_site_messages && @@ -778,7 +787,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [_id, tenant_id, username, display_name, website_url, email, pending_email, backup_email, pending_backup_email, sign_up_date, created_from_url_id, created_from_tenant_id, created_from_ip_hashed, verified, login_id, login_id_date, login_count, opted_in_notifications, opted_in_tenant_notifications, hide_account_code, avatar_src, is_fast_comments_help_request_admin, is_help_request_admin, is_account_owner, is_admin_admin, is_billing_admin, is_analytics_admin, is_customization_admin, is_manage_data_admin, is_comment_moderator_admin, is_api_admin, is_site_admin, moderator_ids, is_impersonator, is_coupon_manager, locale, digest_email_frequency, notification_frequency, admin_notification_frequency, last_tenant_notification_sent_date, last_reply_notification_sent_date, ignored_add_to_my_site_messages, last_login_date, display_label, is_profile_activity_private, is_profile_comments_private, is_profile_dm_disabled, profile_comment_approval_mode, karma, password_hash, average_ticket_ack_time_ms, has_blocked_users, bio, header_background_src, country_code, country_flag, social_links, has_two_factor, is_email_suppressed].hash + [_id, tenant_id, username, display_name, website_url, email, pending_email, backup_email, pending_backup_email, sign_up_date, created_from_url_id, created_from_tenant_id, created_from_ip_hashed, verified, login_id, login_id_date, login_count, opted_in_notifications, opted_in_tenant_notifications, hide_account_code, avatar_src, is_fast_comments_help_request_admin, is_help_request_admin, is_account_owner, is_admin_admin, is_billing_admin, is_analytics_admin, is_customization_admin, is_manage_data_admin, is_comment_moderator_admin, is_api_admin, is_site_admin, moderator_ids, is_impersonator, is_coupon_manager, locale, digest_email_frequency, notification_frequency, admin_notification_frequency, agent_approval_notification_frequency, last_tenant_notification_sent_date, last_reply_notification_sent_date, ignored_add_to_my_site_messages, last_login_date, display_label, is_profile_activity_private, is_profile_comments_private, is_profile_dm_disabled, profile_comment_approval_mode, karma, password_hash, average_ticket_ack_time_ms, has_blocked_users, bio, header_background_src, country_code, country_flag, social_links, has_two_factor, is_email_suppressed].hash end # Builds the object from hash @@ -804,6 +813,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -820,6 +884,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/user_badge.rb b/client/lib/fastcomments-client/models/user_badge.rb index 1a22498..3200ac3 100644 --- a/client/lib/fastcomments-client/models/user_badge.rb +++ b/client/lib/fastcomments-client/models/user_badge.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UserBadge < ApiModelBase + class UserBadge attr_accessor :_id attr_accessor :user_id @@ -498,6 +498,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -514,6 +569,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/user_badge_progress.rb b/client/lib/fastcomments-client/models/user_badge_progress.rb index 7a7515b..8c45af2 100644 --- a/client/lib/fastcomments-client/models/user_badge_progress.rb +++ b/client/lib/fastcomments-client/models/user_badge_progress.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UserBadgeProgress < ApiModelBase + class UserBadgeProgress attr_accessor :_id attr_accessor :tenant_id @@ -303,6 +303,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -319,6 +374,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/user_notification.rb b/client/lib/fastcomments-client/models/user_notification.rb index a5ff5a9..3faf331 100644 --- a/client/lib/fastcomments-client/models/user_notification.rb +++ b/client/lib/fastcomments-client/models/user_notification.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UserNotification < ApiModelBase + class UserNotification attr_accessor :_id attr_accessor :tenant_id @@ -573,6 +573,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -589,6 +644,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/user_notification_count.rb b/client/lib/fastcomments-client/models/user_notification_count.rb index 975d1fe..3e884c4 100644 --- a/client/lib/fastcomments-client/models/user_notification_count.rb +++ b/client/lib/fastcomments-client/models/user_notification_count.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UserNotificationCount < ApiModelBase + class UserNotificationCount attr_accessor :_id attr_accessor :count @@ -221,6 +221,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -237,6 +292,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/user_notification_write_response.rb b/client/lib/fastcomments-client/models/user_notification_write_response.rb index dee2dde..8aefac1 100644 --- a/client/lib/fastcomments-client/models/user_notification_write_response.rb +++ b/client/lib/fastcomments-client/models/user_notification_write_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UserNotificationWriteResponse < ApiModelBase + class UserNotificationWriteResponse attr_accessor :status attr_accessor :matched_count @@ -217,6 +217,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -233,6 +288,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/user_presence_data.rb b/client/lib/fastcomments-client/models/user_presence_data.rb index 4705289..9a203fc 100644 --- a/client/lib/fastcomments-client/models/user_presence_data.rb +++ b/client/lib/fastcomments-client/models/user_presence_data.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UserPresenceData < ApiModelBase + class UserPresenceData attr_accessor :url_id_ws attr_accessor :user_id_ws @@ -144,6 +144,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -160,6 +215,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/user_reacts_response.rb b/client/lib/fastcomments-client/models/user_reacts_response.rb index 0afe10e..78c8f06 100644 --- a/client/lib/fastcomments-client/models/user_reacts_response.rb +++ b/client/lib/fastcomments-client/models/user_reacts_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UserReactsResponse < ApiModelBase + class UserReactsResponse attr_accessor :status attr_accessor :reacts @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/user_search_result.rb b/client/lib/fastcomments-client/models/user_search_result.rb index 502a5b2..d580936 100644 --- a/client/lib/fastcomments-client/models/user_search_result.rb +++ b/client/lib/fastcomments-client/models/user_search_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UserSearchResult < ApiModelBase + class UserSearchResult attr_accessor :id attr_accessor :name @@ -238,6 +238,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -254,6 +309,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/user_search_section.rb b/client/lib/fastcomments-client/models/user_search_section.rb index 6d1fab8..3259c4b 100644 --- a/client/lib/fastcomments-client/models/user_search_section.rb +++ b/client/lib/fastcomments-client/models/user_search_section.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/models/user_search_section_result.rb b/client/lib/fastcomments-client/models/user_search_section_result.rb index 7d39b0b..284ec4b 100644 --- a/client/lib/fastcomments-client/models/user_search_section_result.rb +++ b/client/lib/fastcomments-client/models/user_search_section_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UserSearchSectionResult < ApiModelBase + class UserSearchSectionResult attr_accessor :section attr_accessor :users @@ -193,6 +193,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -209,6 +264,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/user_session_info.rb b/client/lib/fastcomments-client/models/user_session_info.rb index 9628f00..13c88dd 100644 --- a/client/lib/fastcomments-client/models/user_session_info.rb +++ b/client/lib/fastcomments-client/models/user_session_info.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class UserSessionInfo < ApiModelBase + class UserSessionInfo attr_accessor :id attr_accessor :authorized @@ -250,6 +250,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -266,6 +321,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/users_list_location.rb b/client/lib/fastcomments-client/models/users_list_location.rb new file mode 100644 index 0000000..3f159b8 --- /dev/null +++ b/client/lib/fastcomments-client/models/users_list_location.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module FastCommentsClient + class UsersListLocation + N0 = 0.freeze + N1 = 1.freeze + N2 = 2.freeze + N3 = 3.freeze + + def self.all_vars + @all_vars ||= [N0, N1, N2, N3].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if UsersListLocation.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #UsersListLocation" + end + end +end diff --git a/client/lib/fastcomments-client/models/vote_body_params.rb b/client/lib/fastcomments-client/models/vote_body_params.rb index 465833e..d4b845b 100644 --- a/client/lib/fastcomments-client/models/vote_body_params.rb +++ b/client/lib/fastcomments-client/models/vote_body_params.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class VoteBodyParams < ApiModelBase + class VoteBodyParams attr_accessor :commenter_email attr_accessor :commenter_name @@ -203,6 +203,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -219,6 +274,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/vote_comment200_response.rb b/client/lib/fastcomments-client/models/vote_comment200_response.rb deleted file mode 100644 index 1c93755..0000000 --- a/client/lib/fastcomments-client/models/vote_comment200_response.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module FastCommentsClient - module VoteComment200Response - class << self - # List of class defined in anyOf (OpenAPI v3) - def openapi_any_of - [ - :'APIError', - :'VoteResponse' - ] - end - - # Builds the object - # @param [Mixed] Data to be matched against the list of anyOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of anyOf items and attempt to identify the appropriate one. - # Note: - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_any_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - openapi_any_of.include?(:AnyType) ? data : nil - end - - private - - SchemaMismatchError = Class.new(StandardError) - - # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. - def find_and_cast_into_type(klass, data) - return if data.nil? - - case klass.to_s - when 'Boolean' - return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) - when 'Float' - return data if data.instance_of?(Float) - when 'Integer' - return data if data.instance_of?(Integer) - when 'Time' - return Time.parse(data) - when 'Date' - return Date.iso8601(data) - when 'String' - return data if data.instance_of?(String) - when 'Object' # "type: object" - return data if data.instance_of?(Hash) - when /\AArray<(?.+)>\z/ # "type: array" - if data.instance_of?(Array) - sub_type = Regexp.last_match[:sub_type] - return data.map { |item| find_and_cast_into_type(sub_type, item) } - end - when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" - if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } - sub_type = Regexp.last_match[:sub_type] - return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } - end - else # model - const = FastCommentsClient.const_get(klass) - if const - if const.respond_to?(:openapi_any_of) # nested anyOf model - model = const.build(data) - return model if model - else - # raise if data contains keys that are not known to the model - raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? - model = const.build_from_hash(data) - return model if model - end - end - end - - raise # if no match by now, raise - rescue - raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" - end - end - end - -end diff --git a/client/lib/fastcomments-client/models/vote_delete_response.rb b/client/lib/fastcomments-client/models/vote_delete_response.rb index fc3ef49..e9f9e03 100644 --- a/client/lib/fastcomments-client/models/vote_delete_response.rb +++ b/client/lib/fastcomments-client/models/vote_delete_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class VoteDeleteResponse < ApiModelBase + class VoteDeleteResponse attr_accessor :status attr_accessor :was_pending_vote @@ -174,6 +174,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -190,6 +245,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/vote_response.rb b/client/lib/fastcomments-client/models/vote_response.rb index bc12464..dad040e 100644 --- a/client/lib/fastcomments-client/models/vote_response.rb +++ b/client/lib/fastcomments-client/models/vote_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class VoteResponse < ApiModelBase + class VoteResponse attr_accessor :status attr_accessor :vote_id @@ -25,28 +25,6 @@ class VoteResponse < ApiModelBase attr_accessor :edit_key - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -71,7 +49,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'status' => :'String', + :'status' => :'VoteResponseStatus', :'vote_id' => :'String', :'is_verified' => :'Boolean', :'user' => :'VoteResponseUser', @@ -141,18 +119,16 @@ def list_invalid_properties def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @status.nil? - status_validator = EnumAttributeValidator.new('String', ["success", "failed", "pending-verification"]) - return false unless status_validator.valid?(@status) true end - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned def status=(status) - validator = EnumAttributeValidator.new('String', ["success", "failed", "pending-verification"]) - unless validator.valid?(status) - fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + if status.nil? + fail ArgumentError, 'status cannot be nil' end + @status = status end @@ -203,6 +179,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -219,6 +250,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/change_ticket_state200_response.rb b/client/lib/fastcomments-client/models/vote_response_status.rb similarity index 94% rename from client/lib/fastcomments-client/models/change_ticket_state200_response.rb rename to client/lib/fastcomments-client/models/vote_response_status.rb index b60effd..cd0e54e 100644 --- a/client/lib/fastcomments-client/models/change_ticket_state200_response.rb +++ b/client/lib/fastcomments-client/models/vote_response_status.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,13 +14,13 @@ require 'time' module FastCommentsClient - module ChangeTicketState200Response + module VoteResponseStatus class << self # List of class defined in anyOf (OpenAPI v3) def openapi_any_of [ - :'APIError', - :'ChangeTicketStateResponse' + :'APIStatus', + :'String' ] end @@ -37,7 +37,8 @@ def build(data) openapi_any_of.each do |klass| begin next if klass == :AnyType # "nullable: true" - return find_and_cast_into_type(klass, data) + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data rescue # rescue all errors so we keep iterating even if the current item lookup raises end end diff --git a/client/lib/fastcomments-client/models/vote_response_user.rb b/client/lib/fastcomments-client/models/vote_response_user.rb index ea6f993..aba9056 100644 --- a/client/lib/fastcomments-client/models/vote_response_user.rb +++ b/client/lib/fastcomments-client/models/vote_response_user.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,7 +14,7 @@ require 'time' module FastCommentsClient - class VoteResponseUser < ApiModelBase + class VoteResponseUser attr_accessor :session_id # Attribute mapping from ruby-style variable name to JSON key. @@ -127,6 +127,61 @@ def self.build_from_hash(attributes) new(transformed_hash) end + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = FastCommentsClient.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash @@ -143,6 +198,24 @@ def to_hash hash end + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end end diff --git a/client/lib/fastcomments-client/models/vote_style.rb b/client/lib/fastcomments-client/models/vote_style.rb index d3d364b..14ba79e 100644 --- a/client/lib/fastcomments-client/models/vote_style.rb +++ b/client/lib/fastcomments-client/models/vote_style.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/lib/fastcomments-client/version.rb b/client/lib/fastcomments-client/version.rb index 832cf83..dc70fb6 100644 --- a/client/lib/fastcomments-client/version.rb +++ b/client/lib/fastcomments-client/version.rb @@ -6,10 +6,10 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end module FastCommentsClient - VERSION = '1.2.0' + VERSION = '1.2.1' end diff --git a/client/spec/api/default_api_spec.rb b/client/spec/api/default_api_spec.rb index 55c2046..38aad53 100644 --- a/client/spec/api/default_api_spec.rb +++ b/client/spec/api/default_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -36,7 +36,7 @@ # @param tenant_id # @param add_domain_config_params # @param [Hash] opts the optional parameters - # @return [AddDomainConfig200Response] + # @return [AddDomainConfigResponse] describe 'add_domain_config test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -47,7 +47,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :tenant_id # @option opts [CreateHashTagBody] :create_hash_tag_body - # @return [AddHashTag200Response] + # @return [CreateHashTagResponse] describe 'add_hash_tag test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -58,7 +58,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :tenant_id # @option opts [BulkCreateHashTagsBody] :bulk_create_hash_tags_body - # @return [AddHashTagsBulk200Response] + # @return [BulkCreateHashTagsResponse] describe 'add_hash_tags_bulk test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -94,7 +94,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :parent_tenant_id # @option opts [Boolean] :include_stats - # @return [AggregationResponse] + # @return [AggregateResponse] describe 'aggregate test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -110,7 +110,7 @@ # @option opts [AggregateTimeBucket] :time_bucket # @option opts [Time] :start_date # @option opts [Boolean] :force_recalculate - # @return [AggregateQuestionResults200Response] + # @return [AggregateQuestionResultsResponse] describe 'aggregate_question_results test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -124,7 +124,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [BlockFromCommentPublic200Response] + # @return [BlockSuccess] describe 'block_user_from_comment test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -136,7 +136,7 @@ # @param bulk_aggregate_question_results_request # @param [Hash] opts the optional parameters # @option opts [Boolean] :force_recalculate - # @return [BulkAggregateQuestionResults200Response] + # @return [BulkAggregateQuestionResultsResponse] describe 'bulk_aggregate_question_results test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -149,7 +149,7 @@ # @param id # @param change_ticket_state_body # @param [Hash] opts the optional parameters - # @return [ChangeTicketState200Response] + # @return [ChangeTicketStateResponse] describe 'change_ticket_state test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -167,7 +167,7 @@ # @option opts [Float] :min_value # @option opts [Float] :max_value # @option opts [Float] :limit - # @return [CombineCommentsWithQuestionResults200Response] + # @return [CombineQuestionResultsWithCommentsResponse] describe 'combine_comments_with_question_results test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -178,7 +178,7 @@ # @param tenant_id # @param create_email_template_body # @param [Hash] opts the optional parameters - # @return [CreateEmailTemplate200Response] + # @return [CreateEmailTemplateResponse] describe 'create_email_template test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -193,7 +193,7 @@ # @option opts [Boolean] :is_live # @option opts [Boolean] :do_spam_check # @option opts [Boolean] :skip_dup_check - # @return [CreateFeedPost200Response] + # @return [CreateFeedPostsResponse] describe 'create_feed_post test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -204,7 +204,7 @@ # @param tenant_id # @param create_moderator_body # @param [Hash] opts the optional parameters - # @return [CreateModerator200Response] + # @return [CreateModeratorResponse] describe 'create_moderator test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -215,7 +215,7 @@ # @param tenant_id # @param create_question_config_body # @param [Hash] opts the optional parameters - # @return [CreateQuestionConfig200Response] + # @return [CreateQuestionConfigResponse] describe 'create_question_config test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -226,7 +226,7 @@ # @param tenant_id # @param create_question_result_body # @param [Hash] opts the optional parameters - # @return [CreateQuestionResult200Response] + # @return [CreateQuestionResultResponse] describe 'create_question_result test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -248,7 +248,7 @@ # @param tenant_id # @param create_tenant_body # @param [Hash] opts the optional parameters - # @return [CreateTenant200Response] + # @return [CreateTenantResponse] describe 'create_tenant test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -259,7 +259,7 @@ # @param tenant_id # @param create_tenant_package_body # @param [Hash] opts the optional parameters - # @return [CreateTenantPackage200Response] + # @return [CreateTenantPackageResponse] describe 'create_tenant_package test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -270,7 +270,7 @@ # @param tenant_id # @param create_tenant_user_body # @param [Hash] opts the optional parameters - # @return [CreateTenantUser200Response] + # @return [CreateTenantUserResponse] describe 'create_tenant_user test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -282,7 +282,7 @@ # @param user_id # @param create_ticket_body # @param [Hash] opts the optional parameters - # @return [CreateTicket200Response] + # @return [CreateTicketResponse] describe 'create_ticket test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -293,7 +293,7 @@ # @param tenant_id # @param create_user_badge_params # @param [Hash] opts the optional parameters - # @return [CreateUserBadge200Response] + # @return [APICreateUserBadgeResponse] describe 'create_user_badge test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -307,7 +307,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [VoteComment200Response] + # @return [VoteResponse] describe 'create_vote test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -320,7 +320,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :context_user_id # @option opts [Boolean] :is_live - # @return [DeleteComment200Response] + # @return [DeleteCommentResult] describe 'delete_comment test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -331,7 +331,7 @@ # @param tenant_id # @param domain # @param [Hash] opts the optional parameters - # @return [DeleteDomainConfig200Response] + # @return [DeleteDomainConfigResponse] describe 'delete_domain_config test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -342,7 +342,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'delete_email_template test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -354,7 +354,7 @@ # @param id # @param error_id # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'delete_email_template_render_error test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -365,8 +365,8 @@ # @param tag # @param [Hash] opts the optional parameters # @option opts [String] :tenant_id - # @option opts [DeleteHashTagRequest] :delete_hash_tag_request - # @return [FlagCommentPublic200Response] + # @option opts [DeleteHashTagRequestBody] :delete_hash_tag_request_body + # @return [APIEmptyResponse] describe 'delete_hash_tag test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -378,7 +378,7 @@ # @param id # @param [Hash] opts the optional parameters # @option opts [String] :send_email - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'delete_moderator test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -389,7 +389,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'delete_notification_count test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -411,7 +411,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'delete_pending_webhook_event test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -422,7 +422,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'delete_question_config test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -433,7 +433,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'delete_question_result test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -470,7 +470,7 @@ # @param id # @param [Hash] opts the optional parameters # @option opts [String] :sure - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'delete_tenant test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -481,7 +481,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'delete_tenant_package test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -494,7 +494,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :delete_comments # @option opts [String] :comment_delete_mode - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'delete_tenant_user test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -505,7 +505,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [UpdateUserBadge200Response] + # @return [APIEmptySuccessResponse] describe 'delete_user_badge test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -517,7 +517,7 @@ # @param id # @param [Hash] opts the optional parameters # @option opts [String] :edit_key - # @return [DeleteCommentVote200Response] + # @return [VoteDeleteResponse] describe 'delete_vote test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -530,7 +530,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [FlagComment200Response] + # @return [FlagCommentResponse] describe 'flag_comment test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -545,7 +545,7 @@ # @option opts [SORTDIR] :order # @option opts [Float] :after # @option opts [Float] :before - # @return [GetAuditLogs200Response] + # @return [GetAuditLogsResponse] describe 'get_audit_logs test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -556,7 +556,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [GetCachedNotificationCount200Response] + # @return [GetCachedNotificationCountResponse] describe 'get_cached_notification_count test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -567,7 +567,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [GetComment200Response] + # @return [APIGetCommentResponse] describe 'get_comment test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -591,7 +591,9 @@ # @option opts [String] :hash_tag # @option opts [String] :parent_id # @option opts [SortDirections] :direction - # @return [GetComments200Response] + # @option opts [Integer] :from_date + # @option opts [Integer] :to_date + # @return [APIGetCommentsResponse] describe 'get_comments test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -602,7 +604,7 @@ # @param tenant_id # @param domain # @param [Hash] opts the optional parameters - # @return [GetDomainConfig200Response] + # @return [GetDomainConfigResponse] describe 'get_domain_config test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -612,7 +614,7 @@ # unit tests for get_domain_configs # @param tenant_id # @param [Hash] opts the optional parameters - # @return [GetDomainConfigs200Response] + # @return [GetDomainConfigsResponse] describe 'get_domain_configs test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -623,7 +625,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [GetEmailTemplate200Response] + # @return [GetEmailTemplateResponse] describe 'get_email_template test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -633,7 +635,7 @@ # unit tests for get_email_template_definitions # @param tenant_id # @param [Hash] opts the optional parameters - # @return [GetEmailTemplateDefinitions200Response] + # @return [GetEmailTemplateDefinitionsResponse] describe 'get_email_template_definitions test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -645,7 +647,7 @@ # @param id # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [GetEmailTemplateRenderErrors200Response] + # @return [GetEmailTemplateRenderErrorsResponse] describe 'get_email_template_render_errors test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -656,7 +658,7 @@ # @param tenant_id # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [GetEmailTemplates200Response] + # @return [GetEmailTemplatesResponse] describe 'get_email_templates test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -670,7 +672,7 @@ # @option opts [String] :after_id # @option opts [Integer] :limit # @option opts [Array] :tags - # @return [GetFeedPosts200Response] + # @return [GetFeedPostsResponse] describe 'get_feed_posts test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -681,7 +683,7 @@ # @param tenant_id # @param [Hash] opts the optional parameters # @option opts [Float] :page - # @return [GetHashTags200Response] + # @return [GetHashTagsResponse] describe 'get_hash_tags test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -692,7 +694,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [GetModerator200Response] + # @return [GetModeratorResponse] describe 'get_moderator test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -703,7 +705,7 @@ # @param tenant_id # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [GetModerators200Response] + # @return [GetModeratorsResponse] describe 'get_moderators test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -718,7 +720,7 @@ # @option opts [String] :from_comment_id # @option opts [Boolean] :viewed # @option opts [String] :type - # @return [GetNotificationCount200Response] + # @return [GetNotificationCountResponse] describe 'get_notification_count test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -734,7 +736,7 @@ # @option opts [Boolean] :viewed # @option opts [String] :type # @option opts [Float] :skip - # @return [GetNotifications200Response] + # @return [GetNotificationsResponse] describe 'get_notifications test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -771,7 +773,7 @@ # @option opts [String] :type # @option opts [String] :domain # @option opts [Float] :attempt_count_gt - # @return [GetPendingWebhookEventCount200Response] + # @return [GetPendingWebhookEventCountResponse] describe 'get_pending_webhook_event_count test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -788,7 +790,7 @@ # @option opts [String] :domain # @option opts [Float] :attempt_count_gt # @option opts [Float] :skip - # @return [GetPendingWebhookEvents200Response] + # @return [GetPendingWebhookEventsResponse] describe 'get_pending_webhook_events test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -799,7 +801,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [GetQuestionConfig200Response] + # @return [GetQuestionConfigResponse] describe 'get_question_config test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -810,7 +812,7 @@ # @param tenant_id # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [GetQuestionConfigs200Response] + # @return [GetQuestionConfigsResponse] describe 'get_question_configs test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -821,7 +823,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [GetQuestionResult200Response] + # @return [GetQuestionResultResponse] describe 'get_question_result test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -837,7 +839,7 @@ # @option opts [String] :question_id # @option opts [String] :question_ids # @option opts [Float] :skip - # @return [GetQuestionResults200Response] + # @return [GetQuestionResultsResponse] describe 'get_question_results test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -870,7 +872,7 @@ # @param tenant_id # @param [Hash] opts the optional parameters # @option opts [Integer] :skip - # @return [GetSSOUsers200Response] + # @return [GetSSOUsersResponse] describe 'get_sso_users test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -892,7 +894,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [GetTenant200Response] + # @return [GetTenantResponse] describe 'get_tenant test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -906,7 +908,7 @@ # @option opts [Float] :month_number # @option opts [Float] :day_number # @option opts [Float] :skip - # @return [GetTenantDailyUsages200Response] + # @return [GetTenantDailyUsagesResponse] describe 'get_tenant_daily_usages test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -917,7 +919,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [GetTenantPackage200Response] + # @return [GetTenantPackageResponse] describe 'get_tenant_package test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -928,7 +930,7 @@ # @param tenant_id # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [GetTenantPackages200Response] + # @return [GetTenantPackagesResponse] describe 'get_tenant_packages test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -939,7 +941,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [GetTenantUser200Response] + # @return [GetTenantUserResponse] describe 'get_tenant_user test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -950,7 +952,7 @@ # @param tenant_id # @param [Hash] opts the optional parameters # @option opts [Float] :skip - # @return [GetTenantUsers200Response] + # @return [GetTenantUsersResponse] describe 'get_tenant_users test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -962,7 +964,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :meta # @option opts [Float] :skip - # @return [GetTenants200Response] + # @return [GetTenantsResponse] describe 'get_tenants test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -974,7 +976,7 @@ # @param id # @param [Hash] opts the optional parameters # @option opts [String] :user_id - # @return [GetTicket200Response] + # @return [GetTicketResponse] describe 'get_ticket test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -988,7 +990,7 @@ # @option opts [Float] :state # @option opts [Float] :skip # @option opts [Float] :limit - # @return [GetTickets200Response] + # @return [GetTicketsResponse] describe 'get_tickets test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -999,7 +1001,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [GetUser200Response] + # @return [GetUserResponse] describe 'get_user test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1010,7 +1012,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [GetUserBadge200Response] + # @return [APIGetUserBadgeResponse] describe 'get_user_badge test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1021,7 +1023,7 @@ # @param tenant_id # @param id # @param [Hash] opts the optional parameters - # @return [GetUserBadgeProgressById200Response] + # @return [APIGetUserBadgeProgressResponse] describe 'get_user_badge_progress_by_id test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1032,7 +1034,7 @@ # @param tenant_id # @param user_id # @param [Hash] opts the optional parameters - # @return [GetUserBadgeProgressById200Response] + # @return [APIGetUserBadgeProgressResponse] describe 'get_user_badge_progress_by_user_id test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1045,7 +1047,7 @@ # @option opts [String] :user_id # @option opts [Float] :limit # @option opts [Float] :skip - # @return [GetUserBadgeProgressList200Response] + # @return [APIGetUserBadgeProgressListResponse] describe 'get_user_badge_progress_list test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1061,7 +1063,7 @@ # @option opts [Boolean] :displayed_on_comments # @option opts [Float] :limit # @option opts [Float] :skip - # @return [GetUserBadges200Response] + # @return [APIGetUserBadgesResponse] describe 'get_user_badges test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1072,7 +1074,7 @@ # @param tenant_id # @param url_id # @param [Hash] opts the optional parameters - # @return [GetVotes200Response] + # @return [GetVotesResponse] describe 'get_votes test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1085,7 +1087,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [GetVotesForUser200Response] + # @return [GetVotesForUserResponse] describe 'get_votes_for_user test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1097,7 +1099,7 @@ # @param domain_to_update # @param patch_domain_config_params # @param [Hash] opts the optional parameters - # @return [GetDomainConfig200Response] + # @return [PatchDomainConfigResponse] describe 'patch_domain_config test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1109,7 +1111,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :tenant_id # @option opts [UpdateHashTagBody] :update_hash_tag_body - # @return [PatchHashTag200Response] + # @return [UpdateHashTagResponse] describe 'patch_hash_tag test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1146,7 +1148,7 @@ # @param domain_to_update # @param update_domain_config_params # @param [Hash] opts the optional parameters - # @return [GetDomainConfig200Response] + # @return [PutDomainConfigResponse] describe 'put_domain_config test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1171,7 +1173,7 @@ # @param render_email_template_body # @param [Hash] opts the optional parameters # @option opts [String] :locale - # @return [RenderEmailTemplate200Response] + # @return [RenderEmailTemplateResponse] describe 'render_email_template test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1183,7 +1185,7 @@ # @param id # @param replace_tenant_package_body # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'replace_tenant_package test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1196,7 +1198,7 @@ # @param replace_tenant_user_body # @param [Hash] opts the optional parameters # @option opts [String] :update_comments - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'replace_tenant_user test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1211,7 +1213,7 @@ # @option opts [Boolean] :do_spam_check # @option opts [Boolean] :send_emails # @option opts [Boolean] :populate_notifications - # @return [SaveComment200Response] + # @return [APISaveCommentResponse] describe 'save_comment test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1226,7 +1228,7 @@ # @option opts [Boolean] :do_spam_check # @option opts [Boolean] :send_emails # @option opts [Boolean] :populate_notifications - # @return [Array] + # @return [Array] describe 'save_comments_bulk test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1238,7 +1240,7 @@ # @param id # @param from_name # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'send_invite test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1250,7 +1252,7 @@ # @param id # @param [Hash] opts the optional parameters # @option opts [String] :redirect_url - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'send_login_link test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1264,7 +1266,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [UnBlockCommentPublic200Response] + # @return [UnblockSuccess] describe 'un_block_user_from_comment test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1277,7 +1279,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :user_id # @option opts [String] :anon_user_id - # @return [FlagComment200Response] + # @return [FlagCommentResponse] describe 'un_flag_comment test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1292,7 +1294,7 @@ # @option opts [String] :context_user_id # @option opts [Boolean] :do_spam_check # @option opts [Boolean] :is_live - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'update_comment test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1304,7 +1306,7 @@ # @param id # @param update_email_template_body # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'update_email_template test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1316,7 +1318,7 @@ # @param id # @param feed_post # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'update_feed_post test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1328,7 +1330,7 @@ # @param id # @param update_moderator_body # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'update_moderator test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1341,7 +1343,7 @@ # @param update_notification_body # @param [Hash] opts the optional parameters # @option opts [String] :user_id - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'update_notification test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1353,7 +1355,7 @@ # @param id # @param update_question_config_body # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'update_question_config test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1365,7 +1367,7 @@ # @param id # @param update_question_result_body # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'update_question_result test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1390,7 +1392,7 @@ # @param id # @param update_tenant_body # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'update_tenant test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1402,7 +1404,7 @@ # @param id # @param update_tenant_package_body # @param [Hash] opts the optional parameters - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'update_tenant_package test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1415,7 +1417,7 @@ # @param update_tenant_user_body # @param [Hash] opts the optional parameters # @option opts [String] :update_comments - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'update_tenant_user test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -1427,7 +1429,7 @@ # @param id # @param update_user_badge_params # @param [Hash] opts the optional parameters - # @return [UpdateUserBadge200Response] + # @return [APIEmptySuccessResponse] describe 'update_user_badge test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/client/spec/api/moderation_api_spec.rb b/client/spec/api/moderation_api_spec.rb new file mode 100644 index 0000000..276dd14 --- /dev/null +++ b/client/spec/api/moderation_api_spec.rb @@ -0,0 +1,559 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for FastCommentsClient::ModerationApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ModerationApi' do + before do + # run before each test + @api_instance = FastCommentsClient::ModerationApi.new + end + + after do + # run after each test + end + + describe 'test an instance of ModerationApi' do + it 'should create an instance of ModerationApi' do + expect(@api_instance).to be_instance_of(FastCommentsClient::ModerationApi) + end + end + + # unit tests for delete_moderation_vote + # @param comment_id + # @param vote_id + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [VoteDeleteResponse] + describe 'delete_moderation_vote test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_api_comments + # @param [Hash] opts the optional parameters + # @option opts [Float] :page + # @option opts [Float] :count + # @option opts [String] :text_search + # @option opts [String] :by_ip_from_comment + # @option opts [String] :filters + # @option opts [String] :search_filters + # @option opts [String] :sorts + # @option opts [Boolean] :demo + # @option opts [String] :sso + # @return [ModerationAPIGetCommentsResponse] + describe 'get_api_comments test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_api_export_status + # @param [Hash] opts the optional parameters + # @option opts [String] :batch_job_id + # @option opts [String] :sso + # @return [ModerationExportStatusResponse] + describe 'get_api_export_status test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_api_ids + # @param [Hash] opts the optional parameters + # @option opts [String] :text_search + # @option opts [String] :by_ip_from_comment + # @option opts [String] :filters + # @option opts [String] :search_filters + # @option opts [String] :after_id + # @option opts [Boolean] :demo + # @option opts [String] :sso + # @return [ModerationAPIGetCommentIdsResponse] + describe 'get_api_ids test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_ban_users_from_comment + # @param comment_id + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [GetBannedUsersFromCommentResponse] + describe 'get_ban_users_from_comment test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_comment_ban_status + # @param comment_id + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [GetCommentBanStatusResponse] + describe 'get_comment_ban_status test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_comment_children + # @param comment_id + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [ModerationAPIChildCommentsResponse] + describe 'get_comment_children test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_count + # @param [Hash] opts the optional parameters + # @option opts [String] :text_search + # @option opts [String] :by_ip_from_comment + # @option opts [String] :filter + # @option opts [String] :search_filters + # @option opts [Boolean] :demo + # @option opts [String] :sso + # @return [ModerationAPICountCommentsResponse] + describe 'get_count test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_counts + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [GetBannedUsersCountResponse] + describe 'get_counts test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_logs + # @param comment_id + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [ModerationAPIGetLogsResponse] + describe 'get_logs test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_manual_badges + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [GetTenantManualBadgesResponse] + describe 'get_manual_badges test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_manual_badges_for_user + # @param [Hash] opts the optional parameters + # @option opts [String] :badges_user_id + # @option opts [String] :comment_id + # @option opts [String] :sso + # @return [GetUserManualBadgesResponse] + describe 'get_manual_badges_for_user test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_moderation_comment + # @param comment_id + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_email + # @option opts [Boolean] :include_ip + # @option opts [String] :sso + # @return [ModerationAPICommentResponse] + describe 'get_moderation_comment test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_moderation_comment_text + # @param comment_id + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [GetCommentTextResponse] + describe 'get_moderation_comment_text test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_pre_ban_summary + # @param comment_id + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_by_user_id_and_email + # @option opts [Boolean] :include_by_ip + # @option opts [Boolean] :include_by_email_domain + # @option opts [String] :sso + # @return [PreBanSummary] + describe 'get_pre_ban_summary test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_search_comments_summary + # @param [Hash] opts the optional parameters + # @option opts [String] :value + # @option opts [String] :filters + # @option opts [String] :search_filters + # @option opts [String] :sso + # @return [ModerationCommentSearchResponse] + describe 'get_search_comments_summary test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_search_pages + # @param [Hash] opts the optional parameters + # @option opts [String] :value + # @option opts [String] :sso + # @return [ModerationPageSearchResponse] + describe 'get_search_pages test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_search_sites + # @param [Hash] opts the optional parameters + # @option opts [String] :value + # @option opts [String] :sso + # @return [ModerationSiteSearchResponse] + describe 'get_search_sites test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_search_suggest + # @param [Hash] opts the optional parameters + # @option opts [String] :text_search + # @option opts [String] :sso + # @return [ModerationSuggestResponse] + describe 'get_search_suggest test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_search_users + # @param [Hash] opts the optional parameters + # @option opts [String] :value + # @option opts [String] :sso + # @return [ModerationUserSearchResponse] + describe 'get_search_users test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_trust_factor + # @param [Hash] opts the optional parameters + # @option opts [String] :user_id + # @option opts [String] :sso + # @return [GetUserTrustFactorResponse] + describe 'get_trust_factor test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_user_ban_preference + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [APIModerateGetUserBanPreferencesResponse] + describe 'get_user_ban_preference test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_user_internal_profile + # @param [Hash] opts the optional parameters + # @option opts [String] :comment_id + # @option opts [String] :sso + # @return [GetUserInternalProfileResponse] + describe 'get_user_internal_profile test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for post_adjust_comment_votes + # @param comment_id + # @param adjust_comment_votes_params + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [AdjustVotesResponse] + describe 'post_adjust_comment_votes test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for post_api_export + # @param [Hash] opts the optional parameters + # @option opts [String] :text_search + # @option opts [String] :by_ip_from_comment + # @option opts [String] :filters + # @option opts [String] :search_filters + # @option opts [String] :sorts + # @option opts [String] :sso + # @return [ModerationExportResponse] + describe 'post_api_export test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for post_ban_user_from_comment + # @param comment_id + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :ban_email + # @option opts [Boolean] :ban_email_domain + # @option opts [Boolean] :ban_ip + # @option opts [Boolean] :delete_all_users_comments + # @option opts [String] :banned_until + # @option opts [Boolean] :is_shadow_ban + # @option opts [String] :update_id + # @option opts [String] :ban_reason + # @option opts [String] :sso + # @return [BanUserFromCommentResult] + describe 'post_ban_user_from_comment test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for post_ban_user_undo + # @param ban_user_undo_params + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [APIEmptyResponse] + describe 'post_ban_user_undo test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for post_bulk_pre_ban_summary + # @param bulk_pre_ban_params + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_by_user_id_and_email + # @option opts [Boolean] :include_by_ip + # @option opts [Boolean] :include_by_email_domain + # @option opts [String] :sso + # @return [BulkPreBanSummary] + describe 'post_bulk_pre_ban_summary test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for post_comments_by_ids + # @param comments_by_ids_params + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [ModerationAPIChildCommentsResponse] + describe 'post_comments_by_ids test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for post_flag_comment + # @param comment_id + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [APIEmptyResponse] + describe 'post_flag_comment test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for post_remove_comment + # @param comment_id + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [PostRemoveCommentResponse] + describe 'post_remove_comment test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for post_restore_deleted_comment + # @param comment_id + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [APIEmptyResponse] + describe 'post_restore_deleted_comment test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for post_set_comment_approval_status + # @param comment_id + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :approved + # @option opts [String] :sso + # @return [SetCommentApprovedResponse] + describe 'post_set_comment_approval_status test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for post_set_comment_review_status + # @param comment_id + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :reviewed + # @option opts [String] :sso + # @return [APIEmptyResponse] + describe 'post_set_comment_review_status test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for post_set_comment_spam_status + # @param comment_id + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :spam + # @option opts [Boolean] :perm_not_spam + # @option opts [String] :sso + # @return [APIEmptyResponse] + describe 'post_set_comment_spam_status test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for post_set_comment_text + # @param comment_id + # @param set_comment_text_params + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [SetCommentTextResponse] + describe 'post_set_comment_text test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for post_un_flag_comment + # @param comment_id + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [APIEmptyResponse] + describe 'post_un_flag_comment test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for post_vote + # @param comment_id + # @param [Hash] opts the optional parameters + # @option opts [String] :direction + # @option opts [String] :sso + # @return [VoteResponse] + describe 'post_vote test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for put_award_badge + # @param badge_id + # @param [Hash] opts the optional parameters + # @option opts [String] :user_id + # @option opts [String] :comment_id + # @option opts [String] :broadcast_id + # @option opts [String] :sso + # @return [AwardUserBadgeResponse] + describe 'put_award_badge test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for put_close_thread + # @param url_id + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [APIEmptyResponse] + describe 'put_close_thread test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for put_remove_badge + # @param badge_id + # @param [Hash] opts the optional parameters + # @option opts [String] :user_id + # @option opts [String] :comment_id + # @option opts [String] :broadcast_id + # @option opts [String] :sso + # @return [RemoveUserBadgeResponse] + describe 'put_remove_badge test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for put_reopen_thread + # @param url_id + # @param [Hash] opts the optional parameters + # @option opts [String] :sso + # @return [APIEmptyResponse] + describe 'put_reopen_thread test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for set_trust_factor + # @param [Hash] opts the optional parameters + # @option opts [String] :user_id + # @option opts [String] :trust_factor + # @option opts [String] :sso + # @return [SetUserTrustFactorResponse] + describe 'set_trust_factor test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/api/public_api_spec.rb b/client/spec/api/public_api_spec.rb index 3b70d9b..0e9fdbf 100644 --- a/client/spec/api/public_api_spec.rb +++ b/client/spec/api/public_api_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -38,7 +38,7 @@ # @param public_block_from_comment_params # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [BlockFromCommentPublic200Response] + # @return [BlockSuccess] describe 'block_from_comment_public test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -50,7 +50,7 @@ # @param comment_ids A comma separated list of comment ids. # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [CheckedCommentsForBlocked200Response] + # @return [CheckBlockedCommentsResponse] describe 'checked_comments_for_blocked test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -65,7 +65,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :session_id # @option opts [String] :sso - # @return [CreateCommentPublic200Response] + # @return [SaveCommentsResponseWithPresence] describe 'create_comment_public test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -78,13 +78,38 @@ # @param [Hash] opts the optional parameters # @option opts [String] :broadcast_id # @option opts [String] :sso - # @return [CreateFeedPostPublic200Response] + # @return [CreateFeedPostResponse] describe 'create_feed_post_public test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end + # unit tests for create_v1_page_react + # @param tenant_id + # @param url_id + # @param [Hash] opts the optional parameters + # @option opts [String] :title + # @return [CreateV1PageReact] + describe 'create_v1_page_react test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for create_v2_page_react + # @param tenant_id + # @param url_id + # @param id + # @param [Hash] opts the optional parameters + # @option opts [String] :title + # @return [CreateV1PageReact] + describe 'create_v2_page_react test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for delete_comment_public # @param tenant_id # @param comment_id @@ -92,7 +117,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :edit_key # @option opts [String] :sso - # @return [DeleteCommentPublic200Response] + # @return [PublicAPIDeleteCommentResponse] describe 'delete_comment_public test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -108,7 +133,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :edit_key # @option opts [String] :sso - # @return [DeleteCommentVote200Response] + # @return [VoteDeleteResponse] describe 'delete_comment_vote test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -121,20 +146,43 @@ # @param [Hash] opts the optional parameters # @option opts [String] :broadcast_id # @option opts [String] :sso - # @return [DeleteFeedPostPublic200Response] + # @return [DeleteFeedPostPublicResponse] describe 'delete_feed_post_public test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end + # unit tests for delete_v1_page_react + # @param tenant_id + # @param url_id + # @param [Hash] opts the optional parameters + # @return [CreateV1PageReact] + describe 'delete_v1_page_react test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for delete_v2_page_react + # @param tenant_id + # @param url_id + # @param id + # @param [Hash] opts the optional parameters + # @return [CreateV1PageReact] + describe 'delete_v2_page_react test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for flag_comment_public # @param tenant_id # @param comment_id # @param is_flagged # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [FlagCommentPublic200Response] + # @return [APIEmptyResponse] describe 'flag_comment_public test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -147,7 +195,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :edit_key # @option opts [String] :sso - # @return [GetCommentText200Response] + # @return [PublicAPIGetCommentTextResponse] describe 'get_comment_text test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -160,13 +208,29 @@ # @param dir # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [GetCommentVoteUserNames200Response] + # @return [GetCommentVoteUserNamesSuccessResponse] describe 'get_comment_vote_user_names test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end + # unit tests for get_comments_for_user + # @param [Hash] opts the optional parameters + # @option opts [String] :user_id + # @option opts [SortDirections] :direction + # @option opts [String] :replies_to_user_id + # @option opts [Float] :page + # @option opts [Boolean] :includei10n + # @option opts [String] :locale + # @option opts [Boolean] :is_crawler + # @return [GetCommentsForUserResponse] + describe 'get_comments_for_user test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for get_comments_public # req tenantId urlId # @param tenant_id @@ -198,7 +262,7 @@ # @option opts [String] :custom_config_str # @option opts [String] :after_comment_id # @option opts [String] :before_comment_id - # @return [GetCommentsPublic200Response] + # @return [GetCommentsResponseWithPresencePublicComment] describe 'get_comments_public test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -211,9 +275,9 @@ # @param url_id # @param user_id_ws # @param start_time - # @param end_time # @param [Hash] opts the optional parameters - # @return [GetEventLog200Response] + # @option opts [Integer] :end_time + # @return [GetEventLogResponse] describe 'get_event_log test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -230,7 +294,7 @@ # @option opts [String] :sso # @option opts [Boolean] :is_crawler # @option opts [Boolean] :include_user_info - # @return [GetFeedPostsPublic200Response] + # @return [PublicFeedPostsResponse] describe 'get_feed_posts_public test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -242,33 +306,128 @@ # @param post_ids # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [GetFeedPostsStats200Response] + # @return [FeedPostsStatsResponse] describe 'get_feed_posts_stats test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end + # unit tests for get_gif_large + # @param tenant_id + # @param large_internal_url_sanitized + # @param [Hash] opts the optional parameters + # @return [GifGetLargeResponse] + describe 'get_gif_large test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_gifs_search + # @param tenant_id + # @param search + # @param [Hash] opts the optional parameters + # @option opts [String] :locale + # @option opts [String] :rating + # @option opts [Float] :page + # @return [GetGifsSearchResponse] + describe 'get_gifs_search test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_gifs_trending + # @param tenant_id + # @param [Hash] opts the optional parameters + # @option opts [String] :locale + # @option opts [String] :rating + # @option opts [Float] :page + # @return [GetGifsTrendingResponse] + describe 'get_gifs_trending test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for get_global_event_log # req tenantId urlId userIdWS # @param tenant_id # @param url_id # @param user_id_ws # @param start_time - # @param end_time # @param [Hash] opts the optional parameters - # @return [GetEventLog200Response] + # @option opts [Integer] :end_time + # @return [GetEventLogResponse] describe 'get_global_event_log test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end + # unit tests for get_offline_users + # Past commenters on the page who are NOT currently online. Sorted by displayName. Use this after exhausting /users/online to render a \"Members\" section. Cursor pagination on commenterName: server walks the partial {tenantId, urlId, commenterName} index from afterName forward via $gt, no $skip cost. + # @param tenant_id + # @param url_id Page URL identifier (cleaned server-side). + # @param [Hash] opts the optional parameters + # @option opts [String] :after_name Cursor: pass nextAfterName from the previous response. + # @option opts [String] :after_user_id Cursor tiebreaker: pass nextAfterUserId from the previous response. Required when afterName is set so name-ties don't drop entries. + # @return [PageUsersOfflineResponse] + describe 'get_offline_users test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_online_users + # Currently-online viewers of a page: people whose websocket session is subscribed to the page right now. Returns anonCount + totalCount (room-wide subscribers, including anon viewers we don't enumerate). + # @param tenant_id + # @param url_id Page URL identifier (cleaned server-side). + # @param [Hash] opts the optional parameters + # @option opts [String] :after_name Cursor: pass nextAfterName from the previous response. + # @option opts [String] :after_user_id Cursor tiebreaker: pass nextAfterUserId from the previous response. Required when afterName is set so name-ties don't drop entries. + # @return [PageUsersOnlineResponse] + describe 'get_online_users test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_pages_public + # List pages for a tenant. Used by the FChat desktop client to populate its room list. Requires `enableFChat` to be true on the resolved custom config for each page. Pages that require SSO are filtered against the requesting user's group access. + # @param tenant_id + # @param [Hash] opts the optional parameters + # @option opts [String] :cursor Opaque pagination cursor returned as `nextCursor` from a prior request. Tied to the same `sortBy`. + # @option opts [Integer] :limit 1..200, default 50 + # @option opts [String] :q Optional case-insensitive title prefix filter. + # @option opts [PagesSortBy] :sort_by Sort order. `updatedAt` (default, newest first), `commentCount` (most comments first), or `title` (alphabetical). + # @option opts [Boolean] :has_comments If true, only return pages with at least one comment. + # @return [GetPublicPagesResponse] + describe 'get_pages_public test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_translations + # @param namespace + # @param component + # @param [Hash] opts the optional parameters + # @option opts [String] :locale + # @option opts [Boolean] :use_full_translation_ids + # @return [GetTranslationsResponse] + describe 'get_translations test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for get_user_notification_count # @param tenant_id # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [GetUserNotificationCount200Response] + # @return [GetUserNotificationCountResponse] describe 'get_user_notification_count test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -278,6 +437,7 @@ # unit tests for get_user_notifications # @param tenant_id # @param [Hash] opts the optional parameters + # @option opts [String] :url_id Used to determine whether the current page is subscribed. # @option opts [Integer] :page_size # @option opts [String] :after_id # @option opts [Boolean] :include_context @@ -286,8 +446,9 @@ # @option opts [Boolean] :dm_only # @option opts [Boolean] :no_dm # @option opts [Boolean] :include_translations + # @option opts [Boolean] :include_tenant_notifications # @option opts [String] :sso - # @return [GetUserNotifications200Response] + # @return [GetMyNotificationsResponse] describe 'get_user_notifications test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -299,7 +460,7 @@ # @param url_id_ws # @param user_ids # @param [Hash] opts the optional parameters - # @return [GetUserPresenceStatuses200Response] + # @return [GetUserPresenceStatusesResponse] describe 'get_user_presence_statuses test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -311,33 +472,88 @@ # @param [Hash] opts the optional parameters # @option opts [Array] :post_ids # @option opts [String] :sso - # @return [GetUserReactsPublic200Response] + # @return [UserReactsResponse] describe 'get_user_reacts_public test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end + # unit tests for get_users_info + # Bulk user info for a tenant. Given userIds, return display info from User / SSOUser. Used by the comment widget to enrich users that just appeared via a presence event. No page context: privacy is enforced uniformly (private profiles are masked). + # @param tenant_id + # @param ids Comma-delimited userIds. + # @param [Hash] opts the optional parameters + # @return [PageUsersInfoResponse] + describe 'get_users_info test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_v1_page_likes + # @param tenant_id + # @param url_id + # @param [Hash] opts the optional parameters + # @return [GetV1PageLikes] + describe 'get_v1_page_likes test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_v2_page_react_users + # @param tenant_id + # @param url_id + # @param id + # @param [Hash] opts the optional parameters + # @return [GetV2PageReactUsersResponse] + describe 'get_v2_page_react_users test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_v2_page_reacts + # @param tenant_id + # @param url_id + # @param [Hash] opts the optional parameters + # @return [GetV2PageReacts] + describe 'get_v2_page_reacts test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for lock_comment # @param tenant_id # @param comment_id # @param broadcast_id # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [LockComment200Response] + # @return [APIEmptyResponse] describe 'lock_comment test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end + # unit tests for logout_public + # @param [Hash] opts the optional parameters + # @return [APIEmptyResponse] + describe 'logout_public test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for pin_comment # @param tenant_id # @param comment_id # @param broadcast_id # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [PinComment200Response] + # @return [ChangeCommentPinStatusResponse] describe 'pin_comment test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -352,7 +568,7 @@ # @option opts [Boolean] :is_undo # @option opts [String] :broadcast_id # @option opts [String] :sso - # @return [ReactFeedPostPublic200Response] + # @return [ReactFeedPostResponse] describe 'react_feed_post_public test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -363,7 +579,7 @@ # @param tenant_id # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [ResetUserNotifications200Response] + # @return [ResetUserNotificationsResponse] describe 'reset_user_notification_count test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -379,7 +595,7 @@ # @option opts [Boolean] :dm_only # @option opts [Boolean] :no_dm # @option opts [String] :sso - # @return [ResetUserNotifications200Response] + # @return [ResetUserNotificationsResponse] describe 'reset_user_notifications test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -394,7 +610,7 @@ # @option opts [Array] :mention_group_ids # @option opts [String] :sso # @option opts [String] :search_section - # @return [SearchUsers200Response] + # @return [SearchUsersResult] describe 'search_users test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -409,7 +625,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :edit_key # @option opts [String] :sso - # @return [SetCommentText200Response] + # @return [PublicAPISetCommentTextResponse] describe 'set_comment_text test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -422,7 +638,7 @@ # @param public_block_from_comment_params # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [UnBlockCommentPublic200Response] + # @return [UnblockSuccess] describe 'un_block_comment_public test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -435,7 +651,7 @@ # @param broadcast_id # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [LockComment200Response] + # @return [APIEmptyResponse] describe 'un_lock_comment test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -448,7 +664,7 @@ # @param broadcast_id # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [PinComment200Response] + # @return [ChangeCommentPinStatusResponse] describe 'un_pin_comment test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -462,7 +678,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :broadcast_id # @option opts [String] :sso - # @return [CreateFeedPostPublic200Response] + # @return [CreateFeedPostResponse] describe 'update_feed_post_public test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -477,7 +693,7 @@ # @param comment_id # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [UpdateUserNotificationStatus200Response] + # @return [UpdateUserNotificationCommentSubscriptionStatusResponse] describe 'update_user_notification_comment_subscription_status test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -493,7 +709,7 @@ # @param subscribed_or_unsubscribed # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [UpdateUserNotificationStatus200Response] + # @return [UpdateUserNotificationPageSubscriptionStatusResponse] describe 'update_user_notification_page_subscription_status test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -506,7 +722,7 @@ # @param new_status # @param [Hash] opts the optional parameters # @option opts [String] :sso - # @return [UpdateUserNotificationStatus200Response] + # @return [UpdateUserNotificationStatusResponse] describe 'update_user_notification_status test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -536,7 +752,7 @@ # @param [Hash] opts the optional parameters # @option opts [String] :session_id # @option opts [String] :sso - # @return [VoteComment200Response] + # @return [VoteResponse] describe 'vote_comment test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/client/spec/models/add_domain_config_params_spec.rb b/client/spec/models/add_domain_config_params_spec.rb index b53a77f..475d392 100644 --- a/client/spec/models/add_domain_config_params_spec.rb +++ b/client/spec/models/add_domain_config_params_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::AddDomainConfigParams do - #let(:instance) { FastCommentsClient::AddDomainConfigParams.new } + let(:instance) { FastCommentsClient::AddDomainConfigParams.new } describe 'test an instance of AddDomainConfigParams' do it 'should create an instance of AddDomainConfigParams' do diff --git a/client/spec/models/add_domain_config200_response_any_of_spec.rb b/client/spec/models/add_domain_config_response_any_of_spec.rb similarity index 68% rename from client/spec/models/add_domain_config200_response_any_of_spec.rb rename to client/spec/models/add_domain_config_response_any_of_spec.rb index 4df3881..c2af49a 100644 --- a/client/spec/models/add_domain_config200_response_any_of_spec.rb +++ b/client/spec/models/add_domain_config_response_any_of_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,16 +14,16 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::AddDomainConfig200ResponseAnyOf +# Unit tests for FastCommentsClient::AddDomainConfigResponseAnyOf # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::AddDomainConfig200ResponseAnyOf do - #let(:instance) { FastCommentsClient::AddDomainConfig200ResponseAnyOf.new } +describe FastCommentsClient::AddDomainConfigResponseAnyOf do + let(:instance) { FastCommentsClient::AddDomainConfigResponseAnyOf.new } - describe 'test an instance of AddDomainConfig200ResponseAnyOf' do - it 'should create an instance of AddDomainConfig200ResponseAnyOf' do + describe 'test an instance of AddDomainConfigResponseAnyOf' do + it 'should create an instance of AddDomainConfigResponseAnyOf' do # uncomment below to test the instance creation - #expect(instance).to be_instance_of(FastCommentsClient::AddDomainConfig200ResponseAnyOf) + #expect(instance).to be_instance_of(FastCommentsClient::AddDomainConfigResponseAnyOf) end end diff --git a/client/spec/models/get_votes200_response_spec.rb b/client/spec/models/add_domain_config_response_spec.rb similarity index 73% rename from client/spec/models/get_votes200_response_spec.rb rename to client/spec/models/add_domain_config_response_spec.rb index bae5153..3d48e27 100644 --- a/client/spec/models/get_votes200_response_spec.rb +++ b/client/spec/models/add_domain_config_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,8 +14,8 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::GetVotes200Response +# Unit tests for FastCommentsClient::AddDomainConfigResponse # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::GetVotes200Response do +describe FastCommentsClient::AddDomainConfigResponse do end diff --git a/client/spec/models/add_page_api_response_spec.rb b/client/spec/models/add_page_api_response_spec.rb index 3af3738..f1315b2 100644 --- a/client/spec/models/add_page_api_response_spec.rb +++ b/client/spec/models/add_page_api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::AddPageAPIResponse do - #let(:instance) { FastCommentsClient::AddPageAPIResponse.new } + let(:instance) { FastCommentsClient::AddPageAPIResponse.new } describe 'test an instance of AddPageAPIResponse' do it 'should create an instance of AddPageAPIResponse' do diff --git a/client/spec/models/add_sso_user_api_response_spec.rb b/client/spec/models/add_sso_user_api_response_spec.rb index d477a1f..89e6a3d 100644 --- a/client/spec/models/add_sso_user_api_response_spec.rb +++ b/client/spec/models/add_sso_user_api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::AddSSOUserAPIResponse do - #let(:instance) { FastCommentsClient::AddSSOUserAPIResponse.new } + let(:instance) { FastCommentsClient::AddSSOUserAPIResponse.new } describe 'test an instance of AddSSOUserAPIResponse' do it 'should create an instance of AddSSOUserAPIResponse' do diff --git a/client/spec/models/adjust_comment_votes_params_spec.rb b/client/spec/models/adjust_comment_votes_params_spec.rb new file mode 100644 index 0000000..3937c92 --- /dev/null +++ b/client/spec/models/adjust_comment_votes_params_spec.rb @@ -0,0 +1,36 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::AdjustCommentVotesParams +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::AdjustCommentVotesParams do + let(:instance) { FastCommentsClient::AdjustCommentVotesParams.new } + + describe 'test an instance of AdjustCommentVotesParams' do + it 'should create an instance of AdjustCommentVotesParams' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::AdjustCommentVotesParams) + end + end + + describe 'test attribute "adjust_vote_amount"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/adjust_votes_response_spec.rb b/client/spec/models/adjust_votes_response_spec.rb new file mode 100644 index 0000000..434ca4d --- /dev/null +++ b/client/spec/models/adjust_votes_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::AdjustVotesResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::AdjustVotesResponse do + let(:instance) { FastCommentsClient::AdjustVotesResponse.new } + + describe 'test an instance of AdjustVotesResponse' do + it 'should create an instance of AdjustVotesResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::AdjustVotesResponse) + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "new_comment_votes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/aggregate_question_results_response_spec.rb b/client/spec/models/aggregate_question_results_response_spec.rb index 1380016..03bca60 100644 --- a/client/spec/models/aggregate_question_results_response_spec.rb +++ b/client/spec/models/aggregate_question_results_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::AggregateQuestionResultsResponse do - #let(:instance) { FastCommentsClient::AggregateQuestionResultsResponse.new } + let(:instance) { FastCommentsClient::AggregateQuestionResultsResponse.new } describe 'test an instance of AggregateQuestionResultsResponse' do it 'should create an instance of AggregateQuestionResultsResponse' do diff --git a/client/spec/models/get_user200_response_spec.rb b/client/spec/models/aggregate_response_spec.rb similarity index 73% rename from client/spec/models/get_user200_response_spec.rb rename to client/spec/models/aggregate_response_spec.rb index c770c6f..01c902b 100644 --- a/client/spec/models/get_user200_response_spec.rb +++ b/client/spec/models/aggregate_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,8 +14,8 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::GetUser200Response +# Unit tests for FastCommentsClient::AggregateResponse # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::GetUser200Response do +describe FastCommentsClient::AggregateResponse do end diff --git a/client/spec/models/aggregate_time_bucket_spec.rb b/client/spec/models/aggregate_time_bucket_spec.rb index 6eadcdf..d24fed6 100644 --- a/client/spec/models/aggregate_time_bucket_spec.rb +++ b/client/spec/models/aggregate_time_bucket_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::AggregateTimeBucket do - #let(:instance) { FastCommentsClient::AggregateTimeBucket.new } + let(:instance) { FastCommentsClient::AggregateTimeBucket.new } describe 'test an instance of AggregateTimeBucket' do it 'should create an instance of AggregateTimeBucket' do diff --git a/client/spec/models/aggregation_api_error_spec.rb b/client/spec/models/aggregation_api_error_spec.rb new file mode 100644 index 0000000..e0c33cc --- /dev/null +++ b/client/spec/models/aggregation_api_error_spec.rb @@ -0,0 +1,54 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::AggregationAPIError +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::AggregationAPIError do + let(:instance) { FastCommentsClient::AggregationAPIError.new } + + describe 'test an instance of AggregationAPIError' do + it 'should create an instance of AggregationAPIError' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::AggregationAPIError) + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "reason"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "valid_resource_names"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/aggregation_item_spec.rb b/client/spec/models/aggregation_item_spec.rb index c1531c3..bd4d40a 100644 --- a/client/spec/models/aggregation_item_spec.rb +++ b/client/spec/models/aggregation_item_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::AggregationItem do - #let(:instance) { FastCommentsClient::AggregationItem.new } + let(:instance) { FastCommentsClient::AggregationItem.new } describe 'test an instance of AggregationItem' do it 'should create an instance of AggregationItem' do diff --git a/client/spec/models/aggregation_op_type_spec.rb b/client/spec/models/aggregation_op_type_spec.rb index 5ffd3ae..ea1281b 100644 --- a/client/spec/models/aggregation_op_type_spec.rb +++ b/client/spec/models/aggregation_op_type_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::AggregationOpType do - #let(:instance) { FastCommentsClient::AggregationOpType.new } + let(:instance) { FastCommentsClient::AggregationOpType.new } describe 'test an instance of AggregationOpType' do it 'should create an instance of AggregationOpType' do diff --git a/client/spec/models/aggregation_operation_spec.rb b/client/spec/models/aggregation_operation_spec.rb index ddd21d6..e86ce40 100644 --- a/client/spec/models/aggregation_operation_spec.rb +++ b/client/spec/models/aggregation_operation_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::AggregationOperation do - #let(:instance) { FastCommentsClient::AggregationOperation.new } + let(:instance) { FastCommentsClient::AggregationOperation.new } describe 'test an instance of AggregationOperation' do it 'should create an instance of AggregationOperation' do diff --git a/client/spec/models/aggregation_request_sort_spec.rb b/client/spec/models/aggregation_request_sort_spec.rb index bfdaf2f..0cd97ce 100644 --- a/client/spec/models/aggregation_request_sort_spec.rb +++ b/client/spec/models/aggregation_request_sort_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::AggregationRequestSort do - #let(:instance) { FastCommentsClient::AggregationRequestSort.new } + let(:instance) { FastCommentsClient::AggregationRequestSort.new } describe 'test an instance of AggregationRequestSort' do it 'should create an instance of AggregationRequestSort' do diff --git a/client/spec/models/aggregation_request_spec.rb b/client/spec/models/aggregation_request_spec.rb index ae7ae65..52e3932 100644 --- a/client/spec/models/aggregation_request_spec.rb +++ b/client/spec/models/aggregation_request_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::AggregationRequest do - #let(:instance) { FastCommentsClient::AggregationRequest.new } + let(:instance) { FastCommentsClient::AggregationRequest.new } describe 'test an instance of AggregationRequest' do it 'should create an instance of AggregationRequest' do diff --git a/client/spec/models/aggregation_response_spec.rb b/client/spec/models/aggregation_response_spec.rb index 23320e4..e267cf1 100644 --- a/client/spec/models/aggregation_response_spec.rb +++ b/client/spec/models/aggregation_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::AggregationResponse do - #let(:instance) { FastCommentsClient::AggregationResponse.new } + let(:instance) { FastCommentsClient::AggregationResponse.new } describe 'test an instance of AggregationResponse' do it 'should create an instance of AggregationResponse' do diff --git a/client/spec/models/aggregation_response_stats_spec.rb b/client/spec/models/aggregation_response_stats_spec.rb index a7aecdc..f237f77 100644 --- a/client/spec/models/aggregation_response_stats_spec.rb +++ b/client/spec/models/aggregation_response_stats_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::AggregationResponseStats do - #let(:instance) { FastCommentsClient::AggregationResponseStats.new } + let(:instance) { FastCommentsClient::AggregationResponseStats.new } describe 'test an instance of AggregationResponseStats' do it 'should create an instance of AggregationResponseStats' do diff --git a/client/spec/models/aggregation_value_spec.rb b/client/spec/models/aggregation_value_spec.rb index 579b26b..66d6b47 100644 --- a/client/spec/models/aggregation_value_spec.rb +++ b/client/spec/models/aggregation_value_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::AggregationValue do - #let(:instance) { FastCommentsClient::AggregationValue.new } + let(:instance) { FastCommentsClient::AggregationValue.new } describe 'test an instance of AggregationValue' do it 'should create an instance of AggregationValue' do diff --git a/client/spec/models/api_audit_log_spec.rb b/client/spec/models/api_audit_log_spec.rb index 82fc2d2..f85a13c 100644 --- a/client/spec/models/api_audit_log_spec.rb +++ b/client/spec/models/api_audit_log_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APIAuditLog do - #let(:instance) { FastCommentsClient::APIAuditLog.new } + let(:instance) { FastCommentsClient::APIAuditLog.new } describe 'test an instance of APIAuditLog' do it 'should create an instance of APIAuditLog' do diff --git a/client/spec/models/api_ban_user_change_log_spec.rb b/client/spec/models/api_ban_user_change_log_spec.rb new file mode 100644 index 0000000..65cc5ae --- /dev/null +++ b/client/spec/models/api_ban_user_change_log_spec.rb @@ -0,0 +1,54 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::APIBanUserChangeLog +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::APIBanUserChangeLog do + let(:instance) { FastCommentsClient::APIBanUserChangeLog.new } + + describe 'test an instance of APIBanUserChangeLog' do + it 'should create an instance of APIBanUserChangeLog' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::APIBanUserChangeLog) + end + end + + describe 'test attribute "created_banned_user_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "updated_banned_user_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "deleted_banned_users"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "changed_values_before"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/api_ban_user_changed_values_spec.rb b/client/spec/models/api_ban_user_changed_values_spec.rb new file mode 100644 index 0000000..41e00a0 --- /dev/null +++ b/client/spec/models/api_ban_user_changed_values_spec.rb @@ -0,0 +1,108 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::APIBanUserChangedValues +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::APIBanUserChangedValues do + let(:instance) { FastCommentsClient::APIBanUserChangedValues.new } + + describe 'test an instance of APIBanUserChangedValues' do + it 'should create an instance of APIBanUserChangedValues' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::APIBanUserChangedValues) + end + end + + describe 'test attribute "_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tenant_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "user_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "email"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "username"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ip_hash"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "banned_by_user_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "banned_comment_text"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ban_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "banned_until"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_email_wildcard"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ban_reason"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/api_banned_user_spec.rb b/client/spec/models/api_banned_user_spec.rb new file mode 100644 index 0000000..8c9bcdd --- /dev/null +++ b/client/spec/models/api_banned_user_spec.rb @@ -0,0 +1,108 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::APIBannedUser +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::APIBannedUser do + let(:instance) { FastCommentsClient::APIBannedUser.new } + + describe 'test an instance of APIBannedUser' do + it 'should create an instance of APIBannedUser' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::APIBannedUser) + end + end + + describe 'test attribute "_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tenant_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "user_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "email"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "username"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ip_hash"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "banned_by_user_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "banned_comment_text"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ban_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "banned_until"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_email_wildcard"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ban_reason"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/api_banned_user_with_multi_match_info_spec.rb b/client/spec/models/api_banned_user_with_multi_match_info_spec.rb new file mode 100644 index 0000000..994caae --- /dev/null +++ b/client/spec/models/api_banned_user_with_multi_match_info_spec.rb @@ -0,0 +1,84 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::APIBannedUserWithMultiMatchInfo +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::APIBannedUserWithMultiMatchInfo do + let(:instance) { FastCommentsClient::APIBannedUserWithMultiMatchInfo.new } + + describe 'test an instance of APIBannedUserWithMultiMatchInfo' do + it 'should create an instance of APIBannedUserWithMultiMatchInfo' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::APIBannedUserWithMultiMatchInfo) + end + end + + describe 'test attribute "_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "user_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ban_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "email"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ip_hash"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "banned_until"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_email_wildcard"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ban_reason"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "matches"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/api_comment_base_meta_spec.rb b/client/spec/models/api_comment_base_meta_spec.rb index 9b97464..4902966 100644 --- a/client/spec/models/api_comment_base_meta_spec.rb +++ b/client/spec/models/api_comment_base_meta_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APICommentBaseMeta do - #let(:instance) { FastCommentsClient::APICommentBaseMeta.new } + let(:instance) { FastCommentsClient::APICommentBaseMeta.new } describe 'test an instance of APICommentBaseMeta' do it 'should create an instance of APICommentBaseMeta' do diff --git a/client/spec/models/api_comment_base_spec.rb b/client/spec/models/api_comment_base_spec.rb index a63908b..bb3d305 100644 --- a/client/spec/models/api_comment_base_spec.rb +++ b/client/spec/models/api_comment_base_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APICommentBase do - #let(:instance) { FastCommentsClient::APICommentBase.new } + let(:instance) { FastCommentsClient::APICommentBase.new } describe 'test an instance of APICommentBase' do it 'should create an instance of APICommentBase' do @@ -27,7 +27,7 @@ end end - describe 'test attribute "_id"' do + describe 'test attribute "id"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end diff --git a/client/spec/models/api_comment_common_banned_user_spec.rb b/client/spec/models/api_comment_common_banned_user_spec.rb new file mode 100644 index 0000000..0b6381c --- /dev/null +++ b/client/spec/models/api_comment_common_banned_user_spec.rb @@ -0,0 +1,78 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::APICommentCommonBannedUser +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::APICommentCommonBannedUser do + let(:instance) { FastCommentsClient::APICommentCommonBannedUser.new } + + describe 'test an instance of APICommentCommonBannedUser' do + it 'should create an instance of APICommentCommonBannedUser' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::APICommentCommonBannedUser) + end + end + + describe 'test attribute "_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "user_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ban_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "email"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ip_hash"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "banned_until"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_email_wildcard"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ban_reason"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/api_comment_spec.rb b/client/spec/models/api_comment_spec.rb index d5395e0..ebe10ae 100644 --- a/client/spec/models/api_comment_spec.rb +++ b/client/spec/models/api_comment_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APIComment do - #let(:instance) { FastCommentsClient::APIComment.new } + let(:instance) { FastCommentsClient::APIComment.new } describe 'test an instance of APIComment' do it 'should create an instance of APIComment' do @@ -27,7 +27,7 @@ end end - describe 'test attribute "_id"' do + describe 'test attribute "id"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end diff --git a/client/spec/models/api_create_user_badge_response_spec.rb b/client/spec/models/api_create_user_badge_response_spec.rb index a10bfdb..49c46f6 100644 --- a/client/spec/models/api_create_user_badge_response_spec.rb +++ b/client/spec/models/api_create_user_badge_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APICreateUserBadgeResponse do - #let(:instance) { FastCommentsClient::APICreateUserBadgeResponse.new } + let(:instance) { FastCommentsClient::APICreateUserBadgeResponse.new } describe 'test an instance of APICreateUserBadgeResponse' do it 'should create an instance of APICreateUserBadgeResponse' do diff --git a/client/spec/models/api_domain_configuration_spec.rb b/client/spec/models/api_domain_configuration_spec.rb index a2c61be..1ed3516 100644 --- a/client/spec/models/api_domain_configuration_spec.rb +++ b/client/spec/models/api_domain_configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APIDomainConfiguration do - #let(:instance) { FastCommentsClient::APIDomainConfiguration.new } + let(:instance) { FastCommentsClient::APIDomainConfiguration.new } describe 'test an instance of APIDomainConfiguration' do it 'should create an instance of APIDomainConfiguration' do diff --git a/client/spec/models/api_empty_response_spec.rb b/client/spec/models/api_empty_response_spec.rb index 1886570..32f88a3 100644 --- a/client/spec/models/api_empty_response_spec.rb +++ b/client/spec/models/api_empty_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APIEmptyResponse do - #let(:instance) { FastCommentsClient::APIEmptyResponse.new } + let(:instance) { FastCommentsClient::APIEmptyResponse.new } describe 'test an instance of APIEmptyResponse' do it 'should create an instance of APIEmptyResponse' do diff --git a/client/spec/models/api_empty_success_response_spec.rb b/client/spec/models/api_empty_success_response_spec.rb index 25b3cd0..b2567ec 100644 --- a/client/spec/models/api_empty_success_response_spec.rb +++ b/client/spec/models/api_empty_success_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APIEmptySuccessResponse do - #let(:instance) { FastCommentsClient::APIEmptySuccessResponse.new } + let(:instance) { FastCommentsClient::APIEmptySuccessResponse.new } describe 'test an instance of APIEmptySuccessResponse' do it 'should create an instance of APIEmptySuccessResponse' do diff --git a/client/spec/models/api_error_spec.rb b/client/spec/models/api_error_spec.rb index 17d8f25..5f92242 100644 --- a/client/spec/models/api_error_spec.rb +++ b/client/spec/models/api_error_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APIError do - #let(:instance) { FastCommentsClient::APIError.new } + let(:instance) { FastCommentsClient::APIError.new } describe 'test an instance of APIError' do it 'should create an instance of APIError' do diff --git a/client/spec/models/api_get_comment_response_spec.rb b/client/spec/models/api_get_comment_response_spec.rb index 5c0b9dc..a2ce65c 100644 --- a/client/spec/models/api_get_comment_response_spec.rb +++ b/client/spec/models/api_get_comment_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APIGetCommentResponse do - #let(:instance) { FastCommentsClient::APIGetCommentResponse.new } + let(:instance) { FastCommentsClient::APIGetCommentResponse.new } describe 'test an instance of APIGetCommentResponse' do it 'should create an instance of APIGetCommentResponse' do diff --git a/client/spec/models/api_get_comments_response_spec.rb b/client/spec/models/api_get_comments_response_spec.rb index 1c810fe..e3856cd 100644 --- a/client/spec/models/api_get_comments_response_spec.rb +++ b/client/spec/models/api_get_comments_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APIGetCommentsResponse do - #let(:instance) { FastCommentsClient::APIGetCommentsResponse.new } + let(:instance) { FastCommentsClient::APIGetCommentsResponse.new } describe 'test an instance of APIGetCommentsResponse' do it 'should create an instance of APIGetCommentsResponse' do diff --git a/client/spec/models/api_get_user_badge_progress_list_response_spec.rb b/client/spec/models/api_get_user_badge_progress_list_response_spec.rb index e1ac1ae..f5cd733 100644 --- a/client/spec/models/api_get_user_badge_progress_list_response_spec.rb +++ b/client/spec/models/api_get_user_badge_progress_list_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APIGetUserBadgeProgressListResponse do - #let(:instance) { FastCommentsClient::APIGetUserBadgeProgressListResponse.new } + let(:instance) { FastCommentsClient::APIGetUserBadgeProgressListResponse.new } describe 'test an instance of APIGetUserBadgeProgressListResponse' do it 'should create an instance of APIGetUserBadgeProgressListResponse' do diff --git a/client/spec/models/api_get_user_badge_progress_response_spec.rb b/client/spec/models/api_get_user_badge_progress_response_spec.rb index 1e7ff49..781343e 100644 --- a/client/spec/models/api_get_user_badge_progress_response_spec.rb +++ b/client/spec/models/api_get_user_badge_progress_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APIGetUserBadgeProgressResponse do - #let(:instance) { FastCommentsClient::APIGetUserBadgeProgressResponse.new } + let(:instance) { FastCommentsClient::APIGetUserBadgeProgressResponse.new } describe 'test an instance of APIGetUserBadgeProgressResponse' do it 'should create an instance of APIGetUserBadgeProgressResponse' do diff --git a/client/spec/models/api_get_user_badge_response_spec.rb b/client/spec/models/api_get_user_badge_response_spec.rb index 9dffce2..0591d62 100644 --- a/client/spec/models/api_get_user_badge_response_spec.rb +++ b/client/spec/models/api_get_user_badge_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APIGetUserBadgeResponse do - #let(:instance) { FastCommentsClient::APIGetUserBadgeResponse.new } + let(:instance) { FastCommentsClient::APIGetUserBadgeResponse.new } describe 'test an instance of APIGetUserBadgeResponse' do it 'should create an instance of APIGetUserBadgeResponse' do diff --git a/client/spec/models/api_get_user_badges_response_spec.rb b/client/spec/models/api_get_user_badges_response_spec.rb index 122eea2..69934b7 100644 --- a/client/spec/models/api_get_user_badges_response_spec.rb +++ b/client/spec/models/api_get_user_badges_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APIGetUserBadgesResponse do - #let(:instance) { FastCommentsClient::APIGetUserBadgesResponse.new } + let(:instance) { FastCommentsClient::APIGetUserBadgesResponse.new } describe 'test an instance of APIGetUserBadgesResponse' do it 'should create an instance of APIGetUserBadgesResponse' do diff --git a/client/spec/models/api_moderate_get_user_ban_preferences_response_spec.rb b/client/spec/models/api_moderate_get_user_ban_preferences_response_spec.rb new file mode 100644 index 0000000..6e89b2f --- /dev/null +++ b/client/spec/models/api_moderate_get_user_ban_preferences_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::APIModerateGetUserBanPreferencesResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::APIModerateGetUserBanPreferencesResponse do + let(:instance) { FastCommentsClient::APIModerateGetUserBanPreferencesResponse.new } + + describe 'test an instance of APIModerateGetUserBanPreferencesResponse' do + it 'should create an instance of APIModerateGetUserBanPreferencesResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::APIModerateGetUserBanPreferencesResponse) + end + end + + describe 'test attribute "preferences"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/api_moderate_user_ban_preferences_spec.rb b/client/spec/models/api_moderate_user_ban_preferences_spec.rb new file mode 100644 index 0000000..2d80fc4 --- /dev/null +++ b/client/spec/models/api_moderate_user_ban_preferences_spec.rb @@ -0,0 +1,54 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::APIModerateUserBanPreferences +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::APIModerateUserBanPreferences do + let(:instance) { FastCommentsClient::APIModerateUserBanPreferences.new } + + describe 'test an instance of APIModerateUserBanPreferences' do + it 'should create an instance of APIModerateUserBanPreferences' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::APIModerateUserBanPreferences) + end + end + + describe 'test attribute "should_ban_email"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "should_ban_by_ip"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "last_ban_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "last_ban_duration"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/api_page_spec.rb b/client/spec/models/api_page_spec.rb index 9592a30..f7b6e78 100644 --- a/client/spec/models/api_page_spec.rb +++ b/client/spec/models/api_page_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APIPage do - #let(:instance) { FastCommentsClient::APIPage.new } + let(:instance) { FastCommentsClient::APIPage.new } describe 'test an instance of APIPage' do it 'should create an instance of APIPage' do diff --git a/client/spec/models/save_comment_response_spec.rb b/client/spec/models/api_save_comment_response_spec.rb similarity index 74% rename from client/spec/models/save_comment_response_spec.rb rename to client/spec/models/api_save_comment_response_spec.rb index 31ed881..608e25c 100644 --- a/client/spec/models/save_comment_response_spec.rb +++ b/client/spec/models/api_save_comment_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,16 +14,16 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::SaveCommentResponse +# Unit tests for FastCommentsClient::APISaveCommentResponse # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::SaveCommentResponse do - #let(:instance) { FastCommentsClient::SaveCommentResponse.new } +describe FastCommentsClient::APISaveCommentResponse do + let(:instance) { FastCommentsClient::APISaveCommentResponse.new } - describe 'test an instance of SaveCommentResponse' do - it 'should create an instance of SaveCommentResponse' do + describe 'test an instance of APISaveCommentResponse' do + it 'should create an instance of APISaveCommentResponse' do # uncomment below to test the instance creation - #expect(instance).to be_instance_of(FastCommentsClient::SaveCommentResponse) + #expect(instance).to be_instance_of(FastCommentsClient::APISaveCommentResponse) end end diff --git a/client/spec/models/api_status_spec.rb b/client/spec/models/api_status_spec.rb index 8a6ef4a..fee71ab 100644 --- a/client/spec/models/api_status_spec.rb +++ b/client/spec/models/api_status_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APIStatus do - #let(:instance) { FastCommentsClient::APIStatus.new } + let(:instance) { FastCommentsClient::APIStatus.new } describe 'test an instance of APIStatus' do it 'should create an instance of APIStatus' do diff --git a/client/spec/models/api_tenant_daily_usage_spec.rb b/client/spec/models/api_tenant_daily_usage_spec.rb index 9cb824b..63489c4 100644 --- a/client/spec/models/api_tenant_daily_usage_spec.rb +++ b/client/spec/models/api_tenant_daily_usage_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APITenantDailyUsage do - #let(:instance) { FastCommentsClient::APITenantDailyUsage.new } + let(:instance) { FastCommentsClient::APITenantDailyUsage.new } describe 'test an instance of APITenantDailyUsage' do it 'should create an instance of APITenantDailyUsage' do diff --git a/client/spec/models/api_tenant_spec.rb b/client/spec/models/api_tenant_spec.rb index 8fc6685..7e6bba3 100644 --- a/client/spec/models/api_tenant_spec.rb +++ b/client/spec/models/api_tenant_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APITenant do - #let(:instance) { FastCommentsClient::APITenant.new } + let(:instance) { FastCommentsClient::APITenant.new } describe 'test an instance of APITenant' do it 'should create an instance of APITenant' do diff --git a/client/spec/models/api_ticket_detail_spec.rb b/client/spec/models/api_ticket_detail_spec.rb index 7482a12..df14d89 100644 --- a/client/spec/models/api_ticket_detail_spec.rb +++ b/client/spec/models/api_ticket_detail_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APITicketDetail do - #let(:instance) { FastCommentsClient::APITicketDetail.new } + let(:instance) { FastCommentsClient::APITicketDetail.new } describe 'test an instance of APITicketDetail' do it 'should create an instance of APITicketDetail' do diff --git a/client/spec/models/api_ticket_file_spec.rb b/client/spec/models/api_ticket_file_spec.rb index eaa2f5c..f79deca 100644 --- a/client/spec/models/api_ticket_file_spec.rb +++ b/client/spec/models/api_ticket_file_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APITicketFile do - #let(:instance) { FastCommentsClient::APITicketFile.new } + let(:instance) { FastCommentsClient::APITicketFile.new } describe 'test an instance of APITicketFile' do it 'should create an instance of APITicketFile' do diff --git a/client/spec/models/api_ticket_spec.rb b/client/spec/models/api_ticket_spec.rb index df83995..b79ba86 100644 --- a/client/spec/models/api_ticket_spec.rb +++ b/client/spec/models/api_ticket_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APITicket do - #let(:instance) { FastCommentsClient::APITicket.new } + let(:instance) { FastCommentsClient::APITicket.new } describe 'test an instance of APITicket' do it 'should create an instance of APITicket' do diff --git a/client/spec/models/api_user_subscription_spec.rb b/client/spec/models/api_user_subscription_spec.rb index 62e6046..8dbf0d8 100644 --- a/client/spec/models/api_user_subscription_spec.rb +++ b/client/spec/models/api_user_subscription_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APIUserSubscription do - #let(:instance) { FastCommentsClient::APIUserSubscription.new } + let(:instance) { FastCommentsClient::APIUserSubscription.new } describe 'test an instance of APIUserSubscription' do it 'should create an instance of APIUserSubscription' do diff --git a/client/spec/models/apisso_user_spec.rb b/client/spec/models/apisso_user_spec.rb index 21c311b..53e6109 100644 --- a/client/spec/models/apisso_user_spec.rb +++ b/client/spec/models/apisso_user_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::APISSOUser do - #let(:instance) { FastCommentsClient::APISSOUser.new } + let(:instance) { FastCommentsClient::APISSOUser.new } describe 'test an instance of APISSOUser' do it 'should create an instance of APISSOUser' do diff --git a/client/spec/models/award_user_badge_response_spec.rb b/client/spec/models/award_user_badge_response_spec.rb new file mode 100644 index 0000000..6ce0f11 --- /dev/null +++ b/client/spec/models/award_user_badge_response_spec.rb @@ -0,0 +1,48 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::AwardUserBadgeResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::AwardUserBadgeResponse do + let(:instance) { FastCommentsClient::AwardUserBadgeResponse.new } + + describe 'test an instance of AwardUserBadgeResponse' do + it 'should create an instance of AwardUserBadgeResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::AwardUserBadgeResponse) + end + end + + describe 'test attribute "notes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "badges"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/ban_user_from_comment_result_spec.rb b/client/spec/models/ban_user_from_comment_result_spec.rb new file mode 100644 index 0000000..febd5ee --- /dev/null +++ b/client/spec/models/ban_user_from_comment_result_spec.rb @@ -0,0 +1,54 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::BanUserFromCommentResult +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::BanUserFromCommentResult do + let(:instance) { FastCommentsClient::BanUserFromCommentResult.new } + + describe 'test an instance of BanUserFromCommentResult' do + it 'should create an instance of BanUserFromCommentResult' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::BanUserFromCommentResult) + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "changelog"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "reason"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/ban_user_undo_params_spec.rb b/client/spec/models/ban_user_undo_params_spec.rb new file mode 100644 index 0000000..253647c --- /dev/null +++ b/client/spec/models/ban_user_undo_params_spec.rb @@ -0,0 +1,36 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::BanUserUndoParams +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::BanUserUndoParams do + let(:instance) { FastCommentsClient::BanUserUndoParams.new } + + describe 'test an instance of BanUserUndoParams' do + it 'should create an instance of BanUserUndoParams' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::BanUserUndoParams) + end + end + + describe 'test attribute "changelog"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/create_tenant200_response_spec.rb b/client/spec/models/banned_user_match_matched_on_value_spec.rb similarity index 72% rename from client/spec/models/create_tenant200_response_spec.rb rename to client/spec/models/banned_user_match_matched_on_value_spec.rb index f38d880..1d2ccac 100644 --- a/client/spec/models/create_tenant200_response_spec.rb +++ b/client/spec/models/banned_user_match_matched_on_value_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,8 +14,8 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::CreateTenant200Response +# Unit tests for FastCommentsClient::BannedUserMatchMatchedOnValue # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::CreateTenant200Response do +describe FastCommentsClient::BannedUserMatchMatchedOnValue do end diff --git a/client/spec/models/banned_user_match_spec.rb b/client/spec/models/banned_user_match_spec.rb new file mode 100644 index 0000000..6c94f6d --- /dev/null +++ b/client/spec/models/banned_user_match_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::BannedUserMatch +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::BannedUserMatch do + let(:instance) { FastCommentsClient::BannedUserMatch.new } + + describe 'test an instance of BannedUserMatch' do + it 'should create an instance of BannedUserMatch' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::BannedUserMatch) + end + end + + describe 'test attribute "matched_on"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "matched_on_value"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/banned_user_match_type_spec.rb b/client/spec/models/banned_user_match_type_spec.rb new file mode 100644 index 0000000..4356abc --- /dev/null +++ b/client/spec/models/banned_user_match_type_spec.rb @@ -0,0 +1,30 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::BannedUserMatchType +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::BannedUserMatchType do + let(:instance) { FastCommentsClient::BannedUserMatchType.new } + + describe 'test an instance of BannedUserMatchType' do + it 'should create an instance of BannedUserMatchType' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::BannedUserMatchType) + end + end + +end diff --git a/client/spec/models/billing_info_spec.rb b/client/spec/models/billing_info_spec.rb index e408507..1aeb5d3 100644 --- a/client/spec/models/billing_info_spec.rb +++ b/client/spec/models/billing_info_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::BillingInfo do - #let(:instance) { FastCommentsClient::BillingInfo.new } + let(:instance) { FastCommentsClient::BillingInfo.new } describe 'test an instance of BillingInfo' do it 'should create an instance of BillingInfo' do diff --git a/client/spec/models/block_from_comment_params_spec.rb b/client/spec/models/block_from_comment_params_spec.rb index a7b0c70..399e993 100644 --- a/client/spec/models/block_from_comment_params_spec.rb +++ b/client/spec/models/block_from_comment_params_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::BlockFromCommentParams do - #let(:instance) { FastCommentsClient::BlockFromCommentParams.new } + let(:instance) { FastCommentsClient::BlockFromCommentParams.new } describe 'test an instance of BlockFromCommentParams' do it 'should create an instance of BlockFromCommentParams' do diff --git a/client/spec/models/block_from_comment_public200_response_spec.rb b/client/spec/models/block_from_comment_public200_response_spec.rb deleted file mode 100644 index 1b5db54..0000000 --- a/client/spec/models/block_from_comment_public200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::BlockFromCommentPublic200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::BlockFromCommentPublic200Response do -end diff --git a/client/spec/models/block_success_spec.rb b/client/spec/models/block_success_spec.rb index 9769290..1abc8c1 100644 --- a/client/spec/models/block_success_spec.rb +++ b/client/spec/models/block_success_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::BlockSuccess do - #let(:instance) { FastCommentsClient::BlockSuccess.new } + let(:instance) { FastCommentsClient::BlockSuccess.new } describe 'test an instance of BlockSuccess' do it 'should create an instance of BlockSuccess' do diff --git a/client/spec/models/build_moderation_filter_params_spec.rb b/client/spec/models/build_moderation_filter_params_spec.rb new file mode 100644 index 0000000..1e3aaa1 --- /dev/null +++ b/client/spec/models/build_moderation_filter_params_spec.rb @@ -0,0 +1,60 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::BuildModerationFilterParams +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::BuildModerationFilterParams do + let(:instance) { FastCommentsClient::BuildModerationFilterParams.new } + + describe 'test an instance of BuildModerationFilterParams' do + it 'should create an instance of BuildModerationFilterParams' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::BuildModerationFilterParams) + end + end + + describe 'test attribute "user_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tenant_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "filters"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "search_filters"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "text_search"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/build_moderation_filter_response_spec.rb b/client/spec/models/build_moderation_filter_response_spec.rb new file mode 100644 index 0000000..a42cec1 --- /dev/null +++ b/client/spec/models/build_moderation_filter_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::BuildModerationFilterResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::BuildModerationFilterResponse do + let(:instance) { FastCommentsClient::BuildModerationFilterResponse.new } + + describe 'test an instance of BuildModerationFilterResponse' do + it 'should create an instance of BuildModerationFilterResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::BuildModerationFilterResponse) + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "moderation_filter"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/bulk_aggregate_question_item_spec.rb b/client/spec/models/bulk_aggregate_question_item_spec.rb index 98c8274..bfce5de 100644 --- a/client/spec/models/bulk_aggregate_question_item_spec.rb +++ b/client/spec/models/bulk_aggregate_question_item_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::BulkAggregateQuestionItem do - #let(:instance) { FastCommentsClient::BulkAggregateQuestionItem.new } + let(:instance) { FastCommentsClient::BulkAggregateQuestionItem.new } describe 'test an instance of BulkAggregateQuestionItem' do it 'should create an instance of BulkAggregateQuestionItem' do diff --git a/client/spec/models/bulk_aggregate_question_results200_response_spec.rb b/client/spec/models/bulk_aggregate_question_results200_response_spec.rb deleted file mode 100644 index cbe0781..0000000 --- a/client/spec/models/bulk_aggregate_question_results200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::BulkAggregateQuestionResults200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::BulkAggregateQuestionResults200Response do -end diff --git a/client/spec/models/bulk_aggregate_question_results_request_spec.rb b/client/spec/models/bulk_aggregate_question_results_request_spec.rb index 5d9e05a..c4779df 100644 --- a/client/spec/models/bulk_aggregate_question_results_request_spec.rb +++ b/client/spec/models/bulk_aggregate_question_results_request_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::BulkAggregateQuestionResultsRequest do - #let(:instance) { FastCommentsClient::BulkAggregateQuestionResultsRequest.new } + let(:instance) { FastCommentsClient::BulkAggregateQuestionResultsRequest.new } describe 'test an instance of BulkAggregateQuestionResultsRequest' do it 'should create an instance of BulkAggregateQuestionResultsRequest' do diff --git a/client/spec/models/bulk_aggregate_question_results_response_spec.rb b/client/spec/models/bulk_aggregate_question_results_response_spec.rb index 3b488fb..b507cbe 100644 --- a/client/spec/models/bulk_aggregate_question_results_response_spec.rb +++ b/client/spec/models/bulk_aggregate_question_results_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::BulkAggregateQuestionResultsResponse do - #let(:instance) { FastCommentsClient::BulkAggregateQuestionResultsResponse.new } + let(:instance) { FastCommentsClient::BulkAggregateQuestionResultsResponse.new } describe 'test an instance of BulkAggregateQuestionResultsResponse' do it 'should create an instance of BulkAggregateQuestionResultsResponse' do diff --git a/client/spec/models/bulk_create_hash_tags_body_spec.rb b/client/spec/models/bulk_create_hash_tags_body_spec.rb index d4801dc..b525e0e 100644 --- a/client/spec/models/bulk_create_hash_tags_body_spec.rb +++ b/client/spec/models/bulk_create_hash_tags_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::BulkCreateHashTagsBody do - #let(:instance) { FastCommentsClient::BulkCreateHashTagsBody.new } + let(:instance) { FastCommentsClient::BulkCreateHashTagsBody.new } describe 'test an instance of BulkCreateHashTagsBody' do it 'should create an instance of BulkCreateHashTagsBody' do diff --git a/client/spec/models/bulk_create_hash_tags_body_tags_inner_spec.rb b/client/spec/models/bulk_create_hash_tags_body_tags_inner_spec.rb index 3ad1222..aaf5cd0 100644 --- a/client/spec/models/bulk_create_hash_tags_body_tags_inner_spec.rb +++ b/client/spec/models/bulk_create_hash_tags_body_tags_inner_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::BulkCreateHashTagsBodyTagsInner do - #let(:instance) { FastCommentsClient::BulkCreateHashTagsBodyTagsInner.new } + let(:instance) { FastCommentsClient::BulkCreateHashTagsBodyTagsInner.new } describe 'test an instance of BulkCreateHashTagsBodyTagsInner' do it 'should create an instance of BulkCreateHashTagsBodyTagsInner' do diff --git a/client/spec/models/add_hash_tag200_response_spec.rb b/client/spec/models/bulk_create_hash_tags_response_results_inner_spec.rb similarity index 69% rename from client/spec/models/add_hash_tag200_response_spec.rb rename to client/spec/models/bulk_create_hash_tags_response_results_inner_spec.rb index a33d655..5e813d0 100644 --- a/client/spec/models/add_hash_tag200_response_spec.rb +++ b/client/spec/models/bulk_create_hash_tags_response_results_inner_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,8 +14,8 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::AddHashTag200Response +# Unit tests for FastCommentsClient::BulkCreateHashTagsResponseResultsInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::AddHashTag200Response do +describe FastCommentsClient::BulkCreateHashTagsResponseResultsInner do end diff --git a/client/spec/models/bulk_create_hash_tags_response_spec.rb b/client/spec/models/bulk_create_hash_tags_response_spec.rb index 28971ff..7e0b3bf 100644 --- a/client/spec/models/bulk_create_hash_tags_response_spec.rb +++ b/client/spec/models/bulk_create_hash_tags_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::BulkCreateHashTagsResponse do - #let(:instance) { FastCommentsClient::BulkCreateHashTagsResponse.new } + let(:instance) { FastCommentsClient::BulkCreateHashTagsResponse.new } describe 'test an instance of BulkCreateHashTagsResponse' do it 'should create an instance of BulkCreateHashTagsResponse' do diff --git a/client/spec/models/bulk_pre_ban_params_spec.rb b/client/spec/models/bulk_pre_ban_params_spec.rb new file mode 100644 index 0000000..33ba4a7 --- /dev/null +++ b/client/spec/models/bulk_pre_ban_params_spec.rb @@ -0,0 +1,36 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::BulkPreBanParams +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::BulkPreBanParams do + let(:instance) { FastCommentsClient::BulkPreBanParams.new } + + describe 'test an instance of BulkPreBanParams' do + it 'should create an instance of BulkPreBanParams' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::BulkPreBanParams) + end + end + + describe 'test attribute "comment_ids"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/bulk_pre_ban_summary_spec.rb b/client/spec/models/bulk_pre_ban_summary_spec.rb new file mode 100644 index 0000000..502ada5 --- /dev/null +++ b/client/spec/models/bulk_pre_ban_summary_spec.rb @@ -0,0 +1,66 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::BulkPreBanSummary +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::BulkPreBanSummary do + let(:instance) { FastCommentsClient::BulkPreBanSummary.new } + + describe 'test an instance of BulkPreBanSummary' do + it 'should create an instance of BulkPreBanSummary' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::BulkPreBanSummary) + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "total_related_comment_count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "email_domains"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "emails"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "user_ids"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ip_hashes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/change_comment_pin_status_response_spec.rb b/client/spec/models/change_comment_pin_status_response_spec.rb index 4a17828..a6aef85 100644 --- a/client/spec/models/change_comment_pin_status_response_spec.rb +++ b/client/spec/models/change_comment_pin_status_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::ChangeCommentPinStatusResponse do - #let(:instance) { FastCommentsClient::ChangeCommentPinStatusResponse.new } + let(:instance) { FastCommentsClient::ChangeCommentPinStatusResponse.new } describe 'test an instance of ChangeCommentPinStatusResponse' do it 'should create an instance of ChangeCommentPinStatusResponse' do diff --git a/client/spec/models/change_ticket_state200_response_spec.rb b/client/spec/models/change_ticket_state200_response_spec.rb deleted file mode 100644 index 938363f..0000000 --- a/client/spec/models/change_ticket_state200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::ChangeTicketState200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::ChangeTicketState200Response do -end diff --git a/client/spec/models/change_ticket_state_body_spec.rb b/client/spec/models/change_ticket_state_body_spec.rb index d73f071..3505291 100644 --- a/client/spec/models/change_ticket_state_body_spec.rb +++ b/client/spec/models/change_ticket_state_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::ChangeTicketStateBody do - #let(:instance) { FastCommentsClient::ChangeTicketStateBody.new } + let(:instance) { FastCommentsClient::ChangeTicketStateBody.new } describe 'test an instance of ChangeTicketStateBody' do it 'should create an instance of ChangeTicketStateBody' do diff --git a/client/spec/models/change_ticket_state_response_spec.rb b/client/spec/models/change_ticket_state_response_spec.rb index 8cbb1b6..8a3a875 100644 --- a/client/spec/models/change_ticket_state_response_spec.rb +++ b/client/spec/models/change_ticket_state_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::ChangeTicketStateResponse do - #let(:instance) { FastCommentsClient::ChangeTicketStateResponse.new } + let(:instance) { FastCommentsClient::ChangeTicketStateResponse.new } describe 'test an instance of ChangeTicketStateResponse' do it 'should create an instance of ChangeTicketStateResponse' do diff --git a/client/spec/models/check_blocked_comments_response_spec.rb b/client/spec/models/check_blocked_comments_response_spec.rb index 9055bd3..2bd65c5 100644 --- a/client/spec/models/check_blocked_comments_response_spec.rb +++ b/client/spec/models/check_blocked_comments_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CheckBlockedCommentsResponse do - #let(:instance) { FastCommentsClient::CheckBlockedCommentsResponse.new } + let(:instance) { FastCommentsClient::CheckBlockedCommentsResponse.new } describe 'test an instance of CheckBlockedCommentsResponse' do it 'should create an instance of CheckBlockedCommentsResponse' do diff --git a/client/spec/models/checked_comments_for_blocked200_response_spec.rb b/client/spec/models/checked_comments_for_blocked200_response_spec.rb deleted file mode 100644 index 1e5a414..0000000 --- a/client/spec/models/checked_comments_for_blocked200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::CheckedCommentsForBlocked200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::CheckedCommentsForBlocked200Response do -end diff --git a/client/spec/models/combine_comments_with_question_results200_response_spec.rb b/client/spec/models/combine_comments_with_question_results200_response_spec.rb deleted file mode 100644 index 73e90c6..0000000 --- a/client/spec/models/combine_comments_with_question_results200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::CombineCommentsWithQuestionResults200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::CombineCommentsWithQuestionResults200Response do -end diff --git a/client/spec/models/combine_question_results_with_comments_response_spec.rb b/client/spec/models/combine_question_results_with_comments_response_spec.rb index 240a3e3..b108e90 100644 --- a/client/spec/models/combine_question_results_with_comments_response_spec.rb +++ b/client/spec/models/combine_question_results_with_comments_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CombineQuestionResultsWithCommentsResponse do - #let(:instance) { FastCommentsClient::CombineQuestionResultsWithCommentsResponse.new } + let(:instance) { FastCommentsClient::CombineQuestionResultsWithCommentsResponse.new } describe 'test an instance of CombineQuestionResultsWithCommentsResponse' do it 'should create an instance of CombineQuestionResultsWithCommentsResponse' do diff --git a/client/spec/models/comment_data_spec.rb b/client/spec/models/comment_data_spec.rb index ec0392e..3d2320d 100644 --- a/client/spec/models/comment_data_spec.rb +++ b/client/spec/models/comment_data_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CommentData do - #let(:instance) { FastCommentsClient::CommentData.new } + let(:instance) { FastCommentsClient::CommentData.new } describe 'test an instance of CommentData' do it 'should create an instance of CommentData' do @@ -177,4 +177,10 @@ end end + describe 'test attribute "bot_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + end diff --git a/client/spec/models/comment_html_rendering_mode_spec.rb b/client/spec/models/comment_html_rendering_mode_spec.rb index cd09d34..cff018b 100644 --- a/client/spec/models/comment_html_rendering_mode_spec.rb +++ b/client/spec/models/comment_html_rendering_mode_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CommentHTMLRenderingMode do - #let(:instance) { FastCommentsClient::CommentHTMLRenderingMode.new } + let(:instance) { FastCommentsClient::CommentHTMLRenderingMode.new } describe 'test an instance of CommentHTMLRenderingMode' do it 'should create an instance of CommentHTMLRenderingMode' do diff --git a/client/spec/models/comment_log_data_spec.rb b/client/spec/models/comment_log_data_spec.rb index 93bf369..d5819e9 100644 --- a/client/spec/models/comment_log_data_spec.rb +++ b/client/spec/models/comment_log_data_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CommentLogData do - #let(:instance) { FastCommentsClient::CommentLogData.new } + let(:instance) { FastCommentsClient::CommentLogData.new } describe 'test an instance of CommentLogData' do it 'should create an instance of CommentLogData' do @@ -117,6 +117,12 @@ end end + describe 'test attribute "source"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "rule"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/client/spec/models/comment_log_entry_spec.rb b/client/spec/models/comment_log_entry_spec.rb index 678243b..a320e8b 100644 --- a/client/spec/models/comment_log_entry_spec.rb +++ b/client/spec/models/comment_log_entry_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CommentLogEntry do - #let(:instance) { FastCommentsClient::CommentLogEntry.new } + let(:instance) { FastCommentsClient::CommentLogEntry.new } describe 'test an instance of CommentLogEntry' do it 'should create an instance of CommentLogEntry' do diff --git a/client/spec/models/comment_log_type_spec.rb b/client/spec/models/comment_log_type_spec.rb index 60d8689..ee15d85 100644 --- a/client/spec/models/comment_log_type_spec.rb +++ b/client/spec/models/comment_log_type_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CommentLogType do - #let(:instance) { FastCommentsClient::CommentLogType.new } + let(:instance) { FastCommentsClient::CommentLogType.new } describe 'test an instance of CommentLogType' do it 'should create an instance of CommentLogType' do diff --git a/client/spec/models/comment_question_results_rendering_type_spec.rb b/client/spec/models/comment_question_results_rendering_type_spec.rb index 0c84c3e..9daa7ae 100644 --- a/client/spec/models/comment_question_results_rendering_type_spec.rb +++ b/client/spec/models/comment_question_results_rendering_type_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CommentQuestionResultsRenderingType do - #let(:instance) { FastCommentsClient::CommentQuestionResultsRenderingType.new } + let(:instance) { FastCommentsClient::CommentQuestionResultsRenderingType.new } describe 'test an instance of CommentQuestionResultsRenderingType' do it 'should create an instance of CommentQuestionResultsRenderingType' do diff --git a/client/spec/models/comment_questions_required_spec.rb b/client/spec/models/comment_questions_required_spec.rb index f92cf19..092b8c2 100644 --- a/client/spec/models/comment_questions_required_spec.rb +++ b/client/spec/models/comment_questions_required_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CommentQuestionsRequired do - #let(:instance) { FastCommentsClient::CommentQuestionsRequired.new } + let(:instance) { FastCommentsClient::CommentQuestionsRequired.new } describe 'test an instance of CommentQuestionsRequired' do it 'should create an instance of CommentQuestionsRequired' do diff --git a/client/spec/models/comment_text_update_request_spec.rb b/client/spec/models/comment_text_update_request_spec.rb index bcb67f7..08c363f 100644 --- a/client/spec/models/comment_text_update_request_spec.rb +++ b/client/spec/models/comment_text_update_request_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CommentTextUpdateRequest do - #let(:instance) { FastCommentsClient::CommentTextUpdateRequest.new } + let(:instance) { FastCommentsClient::CommentTextUpdateRequest.new } describe 'test an instance of CommentTextUpdateRequest' do it 'should create an instance of CommentTextUpdateRequest' do diff --git a/client/spec/models/comment_thread_deletion_mode_spec.rb b/client/spec/models/comment_thread_deletion_mode_spec.rb index 4175091..ea11dbc 100644 --- a/client/spec/models/comment_thread_deletion_mode_spec.rb +++ b/client/spec/models/comment_thread_deletion_mode_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CommentThreadDeletionMode do - #let(:instance) { FastCommentsClient::CommentThreadDeletionMode.new } + let(:instance) { FastCommentsClient::CommentThreadDeletionMode.new } describe 'test an instance of CommentThreadDeletionMode' do it 'should create an instance of CommentThreadDeletionMode' do diff --git a/client/spec/models/comment_user_badge_info_spec.rb b/client/spec/models/comment_user_badge_info_spec.rb index 0d9cd42..7c9a6ef 100644 --- a/client/spec/models/comment_user_badge_info_spec.rb +++ b/client/spec/models/comment_user_badge_info_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CommentUserBadgeInfo do - #let(:instance) { FastCommentsClient::CommentUserBadgeInfo.new } + let(:instance) { FastCommentsClient::CommentUserBadgeInfo.new } describe 'test an instance of CommentUserBadgeInfo' do it 'should create an instance of CommentUserBadgeInfo' do diff --git a/client/spec/models/comment_user_hash_tag_info_spec.rb b/client/spec/models/comment_user_hash_tag_info_spec.rb index d2ef661..9765cc4 100644 --- a/client/spec/models/comment_user_hash_tag_info_spec.rb +++ b/client/spec/models/comment_user_hash_tag_info_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CommentUserHashTagInfo do - #let(:instance) { FastCommentsClient::CommentUserHashTagInfo.new } + let(:instance) { FastCommentsClient::CommentUserHashTagInfo.new } describe 'test an instance of CommentUserHashTagInfo' do it 'should create an instance of CommentUserHashTagInfo' do diff --git a/client/spec/models/comment_user_mention_info_spec.rb b/client/spec/models/comment_user_mention_info_spec.rb index 2e77f37..609c435 100644 --- a/client/spec/models/comment_user_mention_info_spec.rb +++ b/client/spec/models/comment_user_mention_info_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CommentUserMentionInfo do - #let(:instance) { FastCommentsClient::CommentUserMentionInfo.new } + let(:instance) { FastCommentsClient::CommentUserMentionInfo.new } describe 'test an instance of CommentUserMentionInfo' do it 'should create an instance of CommentUserMentionInfo' do diff --git a/client/spec/models/commenter_name_formats_spec.rb b/client/spec/models/commenter_name_formats_spec.rb index 22457d8..8167ead 100644 --- a/client/spec/models/commenter_name_formats_spec.rb +++ b/client/spec/models/commenter_name_formats_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CommenterNameFormats do - #let(:instance) { FastCommentsClient::CommenterNameFormats.new } + let(:instance) { FastCommentsClient::CommenterNameFormats.new } describe 'test an instance of CommenterNameFormats' do it 'should create an instance of CommenterNameFormats' do diff --git a/client/spec/models/comments_by_ids_params_spec.rb b/client/spec/models/comments_by_ids_params_spec.rb new file mode 100644 index 0000000..b0f083b --- /dev/null +++ b/client/spec/models/comments_by_ids_params_spec.rb @@ -0,0 +1,36 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::CommentsByIdsParams +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::CommentsByIdsParams do + let(:instance) { FastCommentsClient::CommentsByIdsParams.new } + + describe 'test an instance of CommentsByIdsParams' do + it 'should create an instance of CommentsByIdsParams' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::CommentsByIdsParams) + end + end + + describe 'test attribute "ids"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/create_api_page_data_spec.rb b/client/spec/models/create_api_page_data_spec.rb index c5fa087..f38d58f 100644 --- a/client/spec/models/create_api_page_data_spec.rb +++ b/client/spec/models/create_api_page_data_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateAPIPageData do - #let(:instance) { FastCommentsClient::CreateAPIPageData.new } + let(:instance) { FastCommentsClient::CreateAPIPageData.new } describe 'test an instance of CreateAPIPageData' do it 'should create an instance of CreateAPIPageData' do diff --git a/client/spec/models/create_api_user_subscription_data_spec.rb b/client/spec/models/create_api_user_subscription_data_spec.rb index ced6013..1a038ea 100644 --- a/client/spec/models/create_api_user_subscription_data_spec.rb +++ b/client/spec/models/create_api_user_subscription_data_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateAPIUserSubscriptionData do - #let(:instance) { FastCommentsClient::CreateAPIUserSubscriptionData.new } + let(:instance) { FastCommentsClient::CreateAPIUserSubscriptionData.new } describe 'test an instance of CreateAPIUserSubscriptionData' do it 'should create an instance of CreateAPIUserSubscriptionData' do diff --git a/client/spec/models/create_apisso_user_data_spec.rb b/client/spec/models/create_apisso_user_data_spec.rb index 8261c4e..2796ce2 100644 --- a/client/spec/models/create_apisso_user_data_spec.rb +++ b/client/spec/models/create_apisso_user_data_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateAPISSOUserData do - #let(:instance) { FastCommentsClient::CreateAPISSOUserData.new } + let(:instance) { FastCommentsClient::CreateAPISSOUserData.new } describe 'test an instance of CreateAPISSOUserData' do it 'should create an instance of CreateAPISSOUserData' do diff --git a/client/spec/models/create_comment_params_spec.rb b/client/spec/models/create_comment_params_spec.rb index 25ef0cc..603cbad 100644 --- a/client/spec/models/create_comment_params_spec.rb +++ b/client/spec/models/create_comment_params_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateCommentParams do - #let(:instance) { FastCommentsClient::CreateCommentParams.new } + let(:instance) { FastCommentsClient::CreateCommentParams.new } describe 'test an instance of CreateCommentParams' do it 'should create an instance of CreateCommentParams' do @@ -177,6 +177,12 @@ end end + describe 'test attribute "bot_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "approved"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/client/spec/models/create_comment_public200_response_spec.rb b/client/spec/models/create_comment_public200_response_spec.rb deleted file mode 100644 index fbf4f54..0000000 --- a/client/spec/models/create_comment_public200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::CreateCommentPublic200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::CreateCommentPublic200Response do -end diff --git a/client/spec/models/create_email_template200_response_spec.rb b/client/spec/models/create_email_template200_response_spec.rb deleted file mode 100644 index e587516..0000000 --- a/client/spec/models/create_email_template200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::CreateEmailTemplate200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::CreateEmailTemplate200Response do -end diff --git a/client/spec/models/create_email_template_body_spec.rb b/client/spec/models/create_email_template_body_spec.rb index 5c5a828..1b7211c 100644 --- a/client/spec/models/create_email_template_body_spec.rb +++ b/client/spec/models/create_email_template_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateEmailTemplateBody do - #let(:instance) { FastCommentsClient::CreateEmailTemplateBody.new } + let(:instance) { FastCommentsClient::CreateEmailTemplateBody.new } describe 'test an instance of CreateEmailTemplateBody' do it 'should create an instance of CreateEmailTemplateBody' do diff --git a/client/spec/models/create_email_template_response_spec.rb b/client/spec/models/create_email_template_response_spec.rb index a52badc..a32c25f 100644 --- a/client/spec/models/create_email_template_response_spec.rb +++ b/client/spec/models/create_email_template_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateEmailTemplateResponse do - #let(:instance) { FastCommentsClient::CreateEmailTemplateResponse.new } + let(:instance) { FastCommentsClient::CreateEmailTemplateResponse.new } describe 'test an instance of CreateEmailTemplateResponse' do it 'should create an instance of CreateEmailTemplateResponse' do diff --git a/client/spec/models/create_feed_post200_response_spec.rb b/client/spec/models/create_feed_post200_response_spec.rb deleted file mode 100644 index 771b2b1..0000000 --- a/client/spec/models/create_feed_post200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::CreateFeedPost200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::CreateFeedPost200Response do -end diff --git a/client/spec/models/create_feed_post_params_spec.rb b/client/spec/models/create_feed_post_params_spec.rb index 816e56a..6d7ec00 100644 --- a/client/spec/models/create_feed_post_params_spec.rb +++ b/client/spec/models/create_feed_post_params_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateFeedPostParams do - #let(:instance) { FastCommentsClient::CreateFeedPostParams.new } + let(:instance) { FastCommentsClient::CreateFeedPostParams.new } describe 'test an instance of CreateFeedPostParams' do it 'should create an instance of CreateFeedPostParams' do diff --git a/client/spec/models/create_feed_post_public200_response_spec.rb b/client/spec/models/create_feed_post_public200_response_spec.rb deleted file mode 100644 index 948a56c..0000000 --- a/client/spec/models/create_feed_post_public200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::CreateFeedPostPublic200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::CreateFeedPostPublic200Response do -end diff --git a/client/spec/models/create_feed_post_response_spec.rb b/client/spec/models/create_feed_post_response_spec.rb index 312b40a..94ecbe5 100644 --- a/client/spec/models/create_feed_post_response_spec.rb +++ b/client/spec/models/create_feed_post_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateFeedPostResponse do - #let(:instance) { FastCommentsClient::CreateFeedPostResponse.new } + let(:instance) { FastCommentsClient::CreateFeedPostResponse.new } describe 'test an instance of CreateFeedPostResponse' do it 'should create an instance of CreateFeedPostResponse' do diff --git a/client/spec/models/create_feed_posts_response_spec.rb b/client/spec/models/create_feed_posts_response_spec.rb index 4c5bf9e..1a72484 100644 --- a/client/spec/models/create_feed_posts_response_spec.rb +++ b/client/spec/models/create_feed_posts_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateFeedPostsResponse do - #let(:instance) { FastCommentsClient::CreateFeedPostsResponse.new } + let(:instance) { FastCommentsClient::CreateFeedPostsResponse.new } describe 'test an instance of CreateFeedPostsResponse' do it 'should create an instance of CreateFeedPostsResponse' do diff --git a/client/spec/models/create_hash_tag_body_spec.rb b/client/spec/models/create_hash_tag_body_spec.rb index 28af415..88b5a55 100644 --- a/client/spec/models/create_hash_tag_body_spec.rb +++ b/client/spec/models/create_hash_tag_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateHashTagBody do - #let(:instance) { FastCommentsClient::CreateHashTagBody.new } + let(:instance) { FastCommentsClient::CreateHashTagBody.new } describe 'test an instance of CreateHashTagBody' do it 'should create an instance of CreateHashTagBody' do diff --git a/client/spec/models/create_hash_tag_response_spec.rb b/client/spec/models/create_hash_tag_response_spec.rb index 7cce275..b7b9d6f 100644 --- a/client/spec/models/create_hash_tag_response_spec.rb +++ b/client/spec/models/create_hash_tag_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateHashTagResponse do - #let(:instance) { FastCommentsClient::CreateHashTagResponse.new } + let(:instance) { FastCommentsClient::CreateHashTagResponse.new } describe 'test an instance of CreateHashTagResponse' do it 'should create an instance of CreateHashTagResponse' do diff --git a/client/spec/models/create_moderator200_response_spec.rb b/client/spec/models/create_moderator200_response_spec.rb deleted file mode 100644 index d96746d..0000000 --- a/client/spec/models/create_moderator200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::CreateModerator200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::CreateModerator200Response do -end diff --git a/client/spec/models/create_moderator_body_spec.rb b/client/spec/models/create_moderator_body_spec.rb index bc3e85e..8b63005 100644 --- a/client/spec/models/create_moderator_body_spec.rb +++ b/client/spec/models/create_moderator_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateModeratorBody do - #let(:instance) { FastCommentsClient::CreateModeratorBody.new } + let(:instance) { FastCommentsClient::CreateModeratorBody.new } describe 'test an instance of CreateModeratorBody' do it 'should create an instance of CreateModeratorBody' do diff --git a/client/spec/models/create_moderator_response_spec.rb b/client/spec/models/create_moderator_response_spec.rb index 3b39d4d..624adf2 100644 --- a/client/spec/models/create_moderator_response_spec.rb +++ b/client/spec/models/create_moderator_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateModeratorResponse do - #let(:instance) { FastCommentsClient::CreateModeratorResponse.new } + let(:instance) { FastCommentsClient::CreateModeratorResponse.new } describe 'test an instance of CreateModeratorResponse' do it 'should create an instance of CreateModeratorResponse' do diff --git a/client/spec/models/create_question_config200_response_spec.rb b/client/spec/models/create_question_config200_response_spec.rb deleted file mode 100644 index 20429e3..0000000 --- a/client/spec/models/create_question_config200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::CreateQuestionConfig200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::CreateQuestionConfig200Response do -end diff --git a/client/spec/models/create_question_config_body_spec.rb b/client/spec/models/create_question_config_body_spec.rb index 227a3b9..cc35d1a 100644 --- a/client/spec/models/create_question_config_body_spec.rb +++ b/client/spec/models/create_question_config_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateQuestionConfigBody do - #let(:instance) { FastCommentsClient::CreateQuestionConfigBody.new } + let(:instance) { FastCommentsClient::CreateQuestionConfigBody.new } describe 'test an instance of CreateQuestionConfigBody' do it 'should create an instance of CreateQuestionConfigBody' do diff --git a/client/spec/models/create_question_config_response_spec.rb b/client/spec/models/create_question_config_response_spec.rb index 390e4b2..f2baf24 100644 --- a/client/spec/models/create_question_config_response_spec.rb +++ b/client/spec/models/create_question_config_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateQuestionConfigResponse do - #let(:instance) { FastCommentsClient::CreateQuestionConfigResponse.new } + let(:instance) { FastCommentsClient::CreateQuestionConfigResponse.new } describe 'test an instance of CreateQuestionConfigResponse' do it 'should create an instance of CreateQuestionConfigResponse' do diff --git a/client/spec/models/create_question_result200_response_spec.rb b/client/spec/models/create_question_result200_response_spec.rb deleted file mode 100644 index 02c2ef4..0000000 --- a/client/spec/models/create_question_result200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::CreateQuestionResult200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::CreateQuestionResult200Response do -end diff --git a/client/spec/models/create_question_result_body_spec.rb b/client/spec/models/create_question_result_body_spec.rb index 215e9d9..985be68 100644 --- a/client/spec/models/create_question_result_body_spec.rb +++ b/client/spec/models/create_question_result_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateQuestionResultBody do - #let(:instance) { FastCommentsClient::CreateQuestionResultBody.new } + let(:instance) { FastCommentsClient::CreateQuestionResultBody.new } describe 'test an instance of CreateQuestionResultBody' do it 'should create an instance of CreateQuestionResultBody' do diff --git a/client/spec/models/create_question_result_response_spec.rb b/client/spec/models/create_question_result_response_spec.rb index 8132997..60290f4 100644 --- a/client/spec/models/create_question_result_response_spec.rb +++ b/client/spec/models/create_question_result_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateQuestionResultResponse do - #let(:instance) { FastCommentsClient::CreateQuestionResultResponse.new } + let(:instance) { FastCommentsClient::CreateQuestionResultResponse.new } describe 'test an instance of CreateQuestionResultResponse' do it 'should create an instance of CreateQuestionResultResponse' do diff --git a/client/spec/models/create_subscription_api_response_spec.rb b/client/spec/models/create_subscription_api_response_spec.rb index 54dcd82..332cac5 100644 --- a/client/spec/models/create_subscription_api_response_spec.rb +++ b/client/spec/models/create_subscription_api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateSubscriptionAPIResponse do - #let(:instance) { FastCommentsClient::CreateSubscriptionAPIResponse.new } + let(:instance) { FastCommentsClient::CreateSubscriptionAPIResponse.new } describe 'test an instance of CreateSubscriptionAPIResponse' do it 'should create an instance of CreateSubscriptionAPIResponse' do diff --git a/client/spec/models/create_tenant_body_spec.rb b/client/spec/models/create_tenant_body_spec.rb index 5499426..70cde7d 100644 --- a/client/spec/models/create_tenant_body_spec.rb +++ b/client/spec/models/create_tenant_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateTenantBody do - #let(:instance) { FastCommentsClient::CreateTenantBody.new } + let(:instance) { FastCommentsClient::CreateTenantBody.new } describe 'test an instance of CreateTenantBody' do it 'should create an instance of CreateTenantBody' do diff --git a/client/spec/models/create_tenant_package200_response_spec.rb b/client/spec/models/create_tenant_package200_response_spec.rb deleted file mode 100644 index cb1734a..0000000 --- a/client/spec/models/create_tenant_package200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::CreateTenantPackage200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::CreateTenantPackage200Response do -end diff --git a/client/spec/models/create_tenant_package_body_spec.rb b/client/spec/models/create_tenant_package_body_spec.rb index 14c37c7..46ea10a 100644 --- a/client/spec/models/create_tenant_package_body_spec.rb +++ b/client/spec/models/create_tenant_package_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateTenantPackageBody do - #let(:instance) { FastCommentsClient::CreateTenantPackageBody.new } + let(:instance) { FastCommentsClient::CreateTenantPackageBody.new } describe 'test an instance of CreateTenantPackageBody' do it 'should create an instance of CreateTenantPackageBody' do @@ -273,13 +273,13 @@ end end - describe 'test attribute "flex_chat_gpt_cost_cents"' do + describe 'test attribute "flex_llm_cost_cents"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "flex_chat_gpt_unit"' do + describe 'test attribute "flex_llm_unit"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end diff --git a/client/spec/models/create_tenant_package_response_spec.rb b/client/spec/models/create_tenant_package_response_spec.rb index fb0125b..53ddbb0 100644 --- a/client/spec/models/create_tenant_package_response_spec.rb +++ b/client/spec/models/create_tenant_package_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateTenantPackageResponse do - #let(:instance) { FastCommentsClient::CreateTenantPackageResponse.new } + let(:instance) { FastCommentsClient::CreateTenantPackageResponse.new } describe 'test an instance of CreateTenantPackageResponse' do it 'should create an instance of CreateTenantPackageResponse' do diff --git a/client/spec/models/create_tenant_response_spec.rb b/client/spec/models/create_tenant_response_spec.rb index 7937cd2..2c5daba 100644 --- a/client/spec/models/create_tenant_response_spec.rb +++ b/client/spec/models/create_tenant_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateTenantResponse do - #let(:instance) { FastCommentsClient::CreateTenantResponse.new } + let(:instance) { FastCommentsClient::CreateTenantResponse.new } describe 'test an instance of CreateTenantResponse' do it 'should create an instance of CreateTenantResponse' do diff --git a/client/spec/models/create_tenant_user200_response_spec.rb b/client/spec/models/create_tenant_user200_response_spec.rb deleted file mode 100644 index b8ee2d9..0000000 --- a/client/spec/models/create_tenant_user200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::CreateTenantUser200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::CreateTenantUser200Response do -end diff --git a/client/spec/models/create_tenant_user_body_spec.rb b/client/spec/models/create_tenant_user_body_spec.rb index c1abbe2..0a859be 100644 --- a/client/spec/models/create_tenant_user_body_spec.rb +++ b/client/spec/models/create_tenant_user_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateTenantUserBody do - #let(:instance) { FastCommentsClient::CreateTenantUserBody.new } + let(:instance) { FastCommentsClient::CreateTenantUserBody.new } describe 'test an instance of CreateTenantUserBody' do it 'should create an instance of CreateTenantUserBody' do diff --git a/client/spec/models/create_tenant_user_response_spec.rb b/client/spec/models/create_tenant_user_response_spec.rb index 08e9dd7..43a780f 100644 --- a/client/spec/models/create_tenant_user_response_spec.rb +++ b/client/spec/models/create_tenant_user_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateTenantUserResponse do - #let(:instance) { FastCommentsClient::CreateTenantUserResponse.new } + let(:instance) { FastCommentsClient::CreateTenantUserResponse.new } describe 'test an instance of CreateTenantUserResponse' do it 'should create an instance of CreateTenantUserResponse' do diff --git a/client/spec/models/create_ticket200_response_spec.rb b/client/spec/models/create_ticket200_response_spec.rb deleted file mode 100644 index 5c2043f..0000000 --- a/client/spec/models/create_ticket200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::CreateTicket200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::CreateTicket200Response do -end diff --git a/client/spec/models/create_ticket_body_spec.rb b/client/spec/models/create_ticket_body_spec.rb index d1d2a2e..d993e67 100644 --- a/client/spec/models/create_ticket_body_spec.rb +++ b/client/spec/models/create_ticket_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateTicketBody do - #let(:instance) { FastCommentsClient::CreateTicketBody.new } + let(:instance) { FastCommentsClient::CreateTicketBody.new } describe 'test an instance of CreateTicketBody' do it 'should create an instance of CreateTicketBody' do diff --git a/client/spec/models/create_ticket_response_spec.rb b/client/spec/models/create_ticket_response_spec.rb index dc4fb98..28c2747 100644 --- a/client/spec/models/create_ticket_response_spec.rb +++ b/client/spec/models/create_ticket_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateTicketResponse do - #let(:instance) { FastCommentsClient::CreateTicketResponse.new } + let(:instance) { FastCommentsClient::CreateTicketResponse.new } describe 'test an instance of CreateTicketResponse' do it 'should create an instance of CreateTicketResponse' do diff --git a/client/spec/models/create_user_badge200_response_spec.rb b/client/spec/models/create_user_badge200_response_spec.rb deleted file mode 100644 index 5ec8f44..0000000 --- a/client/spec/models/create_user_badge200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::CreateUserBadge200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::CreateUserBadge200Response do -end diff --git a/client/spec/models/create_user_badge_params_spec.rb b/client/spec/models/create_user_badge_params_spec.rb index b89b7cc..c85ef7f 100644 --- a/client/spec/models/create_user_badge_params_spec.rb +++ b/client/spec/models/create_user_badge_params_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CreateUserBadgeParams do - #let(:instance) { FastCommentsClient::CreateUserBadgeParams.new } + let(:instance) { FastCommentsClient::CreateUserBadgeParams.new } describe 'test an instance of CreateUserBadgeParams' do it 'should create an instance of CreateUserBadgeParams' do diff --git a/client/spec/models/create_v1_page_react_spec.rb b/client/spec/models/create_v1_page_react_spec.rb new file mode 100644 index 0000000..1b2dadd --- /dev/null +++ b/client/spec/models/create_v1_page_react_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::CreateV1PageReact +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::CreateV1PageReact do + let(:instance) { FastCommentsClient::CreateV1PageReact.new } + + describe 'test an instance of CreateV1PageReact' do + it 'should create an instance of CreateV1PageReact' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::CreateV1PageReact) + end + end + + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/custom_config_parameters_spec.rb b/client/spec/models/custom_config_parameters_spec.rb index 2e9d114..aa0d120 100644 --- a/client/spec/models/custom_config_parameters_spec.rb +++ b/client/spec/models/custom_config_parameters_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CustomConfigParameters do - #let(:instance) { FastCommentsClient::CustomConfigParameters.new } + let(:instance) { FastCommentsClient::CustomConfigParameters.new } describe 'test an instance of CustomConfigParameters' do it 'should create an instance of CustomConfigParameters' do @@ -339,6 +339,18 @@ end end + describe 'test attribute "allow_embeds"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "allowed_embed_domains"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "no_styles"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -369,6 +381,12 @@ end end + describe 'test attribute "enable_f_chat"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "enable_resize_handle"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -489,6 +507,18 @@ end end + describe 'test attribute "users_list_location"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "users_list_include_offline"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "ticket_base_url"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/client/spec/models/custom_email_template_spec.rb b/client/spec/models/custom_email_template_spec.rb index 2718297..782d4d2 100644 --- a/client/spec/models/custom_email_template_spec.rb +++ b/client/spec/models/custom_email_template_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::CustomEmailTemplate do - #let(:instance) { FastCommentsClient::CustomEmailTemplate.new } + let(:instance) { FastCommentsClient::CustomEmailTemplate.new } describe 'test an instance of CustomEmailTemplate' do it 'should create an instance of CustomEmailTemplate' do diff --git a/client/spec/models/delete_comment200_response_spec.rb b/client/spec/models/delete_comment200_response_spec.rb deleted file mode 100644 index b71d4ad..0000000 --- a/client/spec/models/delete_comment200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::DeleteComment200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::DeleteComment200Response do -end diff --git a/client/spec/models/delete_comment_action_spec.rb b/client/spec/models/delete_comment_action_spec.rb index 07a3938..1fd1180 100644 --- a/client/spec/models/delete_comment_action_spec.rb +++ b/client/spec/models/delete_comment_action_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::DeleteCommentAction do - #let(:instance) { FastCommentsClient::DeleteCommentAction.new } + let(:instance) { FastCommentsClient::DeleteCommentAction.new } describe 'test an instance of DeleteCommentAction' do it 'should create an instance of DeleteCommentAction' do diff --git a/client/spec/models/delete_comment_public200_response_spec.rb b/client/spec/models/delete_comment_public200_response_spec.rb deleted file mode 100644 index 0a19e6d..0000000 --- a/client/spec/models/delete_comment_public200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::DeleteCommentPublic200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::DeleteCommentPublic200Response do -end diff --git a/client/spec/models/delete_comment_result_spec.rb b/client/spec/models/delete_comment_result_spec.rb index f29adad..301d603 100644 --- a/client/spec/models/delete_comment_result_spec.rb +++ b/client/spec/models/delete_comment_result_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::DeleteCommentResult do - #let(:instance) { FastCommentsClient::DeleteCommentResult.new } + let(:instance) { FastCommentsClient::DeleteCommentResult.new } describe 'test an instance of DeleteCommentResult' do it 'should create an instance of DeleteCommentResult' do diff --git a/client/spec/models/delete_comment_vote200_response_spec.rb b/client/spec/models/delete_comment_vote200_response_spec.rb deleted file mode 100644 index 4bb3ce9..0000000 --- a/client/spec/models/delete_comment_vote200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::DeleteCommentVote200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::DeleteCommentVote200Response do -end diff --git a/client/spec/models/delete_domain_config200_response_spec.rb b/client/spec/models/delete_domain_config_response_spec.rb similarity index 63% rename from client/spec/models/delete_domain_config200_response_spec.rb rename to client/spec/models/delete_domain_config_response_spec.rb index fe2baef..9d37fce 100644 --- a/client/spec/models/delete_domain_config200_response_spec.rb +++ b/client/spec/models/delete_domain_config_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,16 +14,16 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::DeleteDomainConfig200Response +# Unit tests for FastCommentsClient::DeleteDomainConfigResponse # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::DeleteDomainConfig200Response do - #let(:instance) { FastCommentsClient::DeleteDomainConfig200Response.new } +describe FastCommentsClient::DeleteDomainConfigResponse do + let(:instance) { FastCommentsClient::DeleteDomainConfigResponse.new } - describe 'test an instance of DeleteDomainConfig200Response' do - it 'should create an instance of DeleteDomainConfig200Response' do + describe 'test an instance of DeleteDomainConfigResponse' do + it 'should create an instance of DeleteDomainConfigResponse' do # uncomment below to test the instance creation - #expect(instance).to be_instance_of(FastCommentsClient::DeleteDomainConfig200Response) + #expect(instance).to be_instance_of(FastCommentsClient::DeleteDomainConfigResponse) end end diff --git a/client/spec/models/delete_feed_post_public200_response_spec.rb b/client/spec/models/delete_feed_post_public200_response_spec.rb deleted file mode 100644 index 943807a..0000000 --- a/client/spec/models/delete_feed_post_public200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::DeleteFeedPostPublic200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::DeleteFeedPostPublic200Response do -end diff --git a/client/spec/models/delete_feed_post_public200_response_any_of_spec.rb b/client/spec/models/delete_feed_post_public_response_spec.rb similarity index 61% rename from client/spec/models/delete_feed_post_public200_response_any_of_spec.rb rename to client/spec/models/delete_feed_post_public_response_spec.rb index 563c59f..67aa3a9 100644 --- a/client/spec/models/delete_feed_post_public200_response_any_of_spec.rb +++ b/client/spec/models/delete_feed_post_public_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,16 +14,16 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::DeleteFeedPostPublic200ResponseAnyOf +# Unit tests for FastCommentsClient::DeleteFeedPostPublicResponse # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::DeleteFeedPostPublic200ResponseAnyOf do - #let(:instance) { FastCommentsClient::DeleteFeedPostPublic200ResponseAnyOf.new } +describe FastCommentsClient::DeleteFeedPostPublicResponse do + let(:instance) { FastCommentsClient::DeleteFeedPostPublicResponse.new } - describe 'test an instance of DeleteFeedPostPublic200ResponseAnyOf' do - it 'should create an instance of DeleteFeedPostPublic200ResponseAnyOf' do + describe 'test an instance of DeleteFeedPostPublicResponse' do + it 'should create an instance of DeleteFeedPostPublicResponse' do # uncomment below to test the instance creation - #expect(instance).to be_instance_of(FastCommentsClient::DeleteFeedPostPublic200ResponseAnyOf) + #expect(instance).to be_instance_of(FastCommentsClient::DeleteFeedPostPublicResponse) end end diff --git a/client/spec/models/delete_hash_tag_request_spec.rb b/client/spec/models/delete_hash_tag_request_body_spec.rb similarity index 66% rename from client/spec/models/delete_hash_tag_request_spec.rb rename to client/spec/models/delete_hash_tag_request_body_spec.rb index 0a932ea..285b131 100644 --- a/client/spec/models/delete_hash_tag_request_spec.rb +++ b/client/spec/models/delete_hash_tag_request_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,16 +14,16 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::DeleteHashTagRequest +# Unit tests for FastCommentsClient::DeleteHashTagRequestBody # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::DeleteHashTagRequest do - #let(:instance) { FastCommentsClient::DeleteHashTagRequest.new } +describe FastCommentsClient::DeleteHashTagRequestBody do + let(:instance) { FastCommentsClient::DeleteHashTagRequestBody.new } - describe 'test an instance of DeleteHashTagRequest' do - it 'should create an instance of DeleteHashTagRequest' do + describe 'test an instance of DeleteHashTagRequestBody' do + it 'should create an instance of DeleteHashTagRequestBody' do # uncomment below to test the instance creation - #expect(instance).to be_instance_of(FastCommentsClient::DeleteHashTagRequest) + #expect(instance).to be_instance_of(FastCommentsClient::DeleteHashTagRequestBody) end end diff --git a/client/spec/models/delete_page_api_response_spec.rb b/client/spec/models/delete_page_api_response_spec.rb index 23a8d61..7b25e17 100644 --- a/client/spec/models/delete_page_api_response_spec.rb +++ b/client/spec/models/delete_page_api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::DeletePageAPIResponse do - #let(:instance) { FastCommentsClient::DeletePageAPIResponse.new } + let(:instance) { FastCommentsClient::DeletePageAPIResponse.new } describe 'test an instance of DeletePageAPIResponse' do it 'should create an instance of DeletePageAPIResponse' do diff --git a/client/spec/models/delete_sso_user_api_response_spec.rb b/client/spec/models/delete_sso_user_api_response_spec.rb index b94ce00..10367fd 100644 --- a/client/spec/models/delete_sso_user_api_response_spec.rb +++ b/client/spec/models/delete_sso_user_api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::DeleteSSOUserAPIResponse do - #let(:instance) { FastCommentsClient::DeleteSSOUserAPIResponse.new } + let(:instance) { FastCommentsClient::DeleteSSOUserAPIResponse.new } describe 'test an instance of DeleteSSOUserAPIResponse' do it 'should create an instance of DeleteSSOUserAPIResponse' do diff --git a/client/spec/models/delete_subscription_api_response_spec.rb b/client/spec/models/delete_subscription_api_response_spec.rb index eb3a4f4..4f1b23f 100644 --- a/client/spec/models/delete_subscription_api_response_spec.rb +++ b/client/spec/models/delete_subscription_api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::DeleteSubscriptionAPIResponse do - #let(:instance) { FastCommentsClient::DeleteSubscriptionAPIResponse.new } + let(:instance) { FastCommentsClient::DeleteSubscriptionAPIResponse.new } describe 'test an instance of DeleteSubscriptionAPIResponse' do it 'should create an instance of DeleteSubscriptionAPIResponse' do diff --git a/client/spec/models/deleted_comment_result_comment_spec.rb b/client/spec/models/deleted_comment_result_comment_spec.rb index cc0d43d..e743fe8 100644 --- a/client/spec/models/deleted_comment_result_comment_spec.rb +++ b/client/spec/models/deleted_comment_result_comment_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::DeletedCommentResultComment do - #let(:instance) { FastCommentsClient::DeletedCommentResultComment.new } + let(:instance) { FastCommentsClient::DeletedCommentResultComment.new } describe 'test an instance of DeletedCommentResultComment' do it 'should create an instance of DeletedCommentResultComment' do diff --git a/client/spec/models/digest_email_frequency_spec.rb b/client/spec/models/digest_email_frequency_spec.rb index 9dd15d3..d28a35a 100644 --- a/client/spec/models/digest_email_frequency_spec.rb +++ b/client/spec/models/digest_email_frequency_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::DigestEmailFrequency do - #let(:instance) { FastCommentsClient::DigestEmailFrequency.new } + let(:instance) { FastCommentsClient::DigestEmailFrequency.new } describe 'test an instance of DigestEmailFrequency' do it 'should create an instance of DigestEmailFrequency' do diff --git a/client/spec/models/email_template_definition_spec.rb b/client/spec/models/email_template_definition_spec.rb index 12ced5e..9903bc2 100644 --- a/client/spec/models/email_template_definition_spec.rb +++ b/client/spec/models/email_template_definition_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::EmailTemplateDefinition do - #let(:instance) { FastCommentsClient::EmailTemplateDefinition.new } + let(:instance) { FastCommentsClient::EmailTemplateDefinition.new } describe 'test an instance of EmailTemplateDefinition' do it 'should create an instance of EmailTemplateDefinition' do diff --git a/client/spec/models/email_template_render_error_response_spec.rb b/client/spec/models/email_template_render_error_response_spec.rb index 38cedad..4ca6d9c 100644 --- a/client/spec/models/email_template_render_error_response_spec.rb +++ b/client/spec/models/email_template_render_error_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::EmailTemplateRenderErrorResponse do - #let(:instance) { FastCommentsClient::EmailTemplateRenderErrorResponse.new } + let(:instance) { FastCommentsClient::EmailTemplateRenderErrorResponse.new } describe 'test an instance of EmailTemplateRenderErrorResponse' do it 'should create an instance of EmailTemplateRenderErrorResponse' do diff --git a/client/spec/models/event_log_entry_spec.rb b/client/spec/models/event_log_entry_spec.rb index f9e36e1..cc02050 100644 --- a/client/spec/models/event_log_entry_spec.rb +++ b/client/spec/models/event_log_entry_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::EventLogEntry do - #let(:instance) { FastCommentsClient::EventLogEntry.new } + let(:instance) { FastCommentsClient::EventLogEntry.new } describe 'test an instance of EventLogEntry' do it 'should create an instance of EventLogEntry' do diff --git a/client/spec/models/f_comment_meta_spec.rb b/client/spec/models/f_comment_meta_spec.rb index f6b6920..3b2be1f 100644 --- a/client/spec/models/f_comment_meta_spec.rb +++ b/client/spec/models/f_comment_meta_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::FCommentMeta do - #let(:instance) { FastCommentsClient::FCommentMeta.new } + let(:instance) { FastCommentsClient::FCommentMeta.new } describe 'test an instance of FCommentMeta' do it 'should create an instance of FCommentMeta' do diff --git a/client/spec/models/f_comment_spec.rb b/client/spec/models/f_comment_spec.rb index 9ffc161..2032397 100644 --- a/client/spec/models/f_comment_spec.rb +++ b/client/spec/models/f_comment_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::FComment do - #let(:instance) { FastCommentsClient::FComment.new } + let(:instance) { FastCommentsClient::FComment.new } describe 'test an instance of FComment' do it 'should create an instance of FComment' do @@ -459,4 +459,10 @@ end end + describe 'test attribute "bot_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + end diff --git a/client/spec/models/feed_post_link_spec.rb b/client/spec/models/feed_post_link_spec.rb index 592d015..54490ce 100644 --- a/client/spec/models/feed_post_link_spec.rb +++ b/client/spec/models/feed_post_link_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::FeedPostLink do - #let(:instance) { FastCommentsClient::FeedPostLink.new } + let(:instance) { FastCommentsClient::FeedPostLink.new } describe 'test an instance of FeedPostLink' do it 'should create an instance of FeedPostLink' do diff --git a/client/spec/models/feed_post_media_item_asset_spec.rb b/client/spec/models/feed_post_media_item_asset_spec.rb index f849976..b02d837 100644 --- a/client/spec/models/feed_post_media_item_asset_spec.rb +++ b/client/spec/models/feed_post_media_item_asset_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::FeedPostMediaItemAsset do - #let(:instance) { FastCommentsClient::FeedPostMediaItemAsset.new } + let(:instance) { FastCommentsClient::FeedPostMediaItemAsset.new } describe 'test an instance of FeedPostMediaItemAsset' do it 'should create an instance of FeedPostMediaItemAsset' do diff --git a/client/spec/models/feed_post_media_item_spec.rb b/client/spec/models/feed_post_media_item_spec.rb index 1bf11ec..4064406 100644 --- a/client/spec/models/feed_post_media_item_spec.rb +++ b/client/spec/models/feed_post_media_item_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::FeedPostMediaItem do - #let(:instance) { FastCommentsClient::FeedPostMediaItem.new } + let(:instance) { FastCommentsClient::FeedPostMediaItem.new } describe 'test an instance of FeedPostMediaItem' do it 'should create an instance of FeedPostMediaItem' do diff --git a/client/spec/models/feed_post_spec.rb b/client/spec/models/feed_post_spec.rb index a5adf2e..f92e660 100644 --- a/client/spec/models/feed_post_spec.rb +++ b/client/spec/models/feed_post_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::FeedPost do - #let(:instance) { FastCommentsClient::FeedPost.new } + let(:instance) { FastCommentsClient::FeedPost.new } describe 'test an instance of FeedPost' do it 'should create an instance of FeedPost' do diff --git a/client/spec/models/feed_post_stats_spec.rb b/client/spec/models/feed_post_stats_spec.rb index 3424404..c6d28ff 100644 --- a/client/spec/models/feed_post_stats_spec.rb +++ b/client/spec/models/feed_post_stats_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::FeedPostStats do - #let(:instance) { FastCommentsClient::FeedPostStats.new } + let(:instance) { FastCommentsClient::FeedPostStats.new } describe 'test an instance of FeedPostStats' do it 'should create an instance of FeedPostStats' do diff --git a/client/spec/models/feed_posts_stats_response_spec.rb b/client/spec/models/feed_posts_stats_response_spec.rb index 746f3a5..f9387e9 100644 --- a/client/spec/models/feed_posts_stats_response_spec.rb +++ b/client/spec/models/feed_posts_stats_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::FeedPostsStatsResponse do - #let(:instance) { FastCommentsClient::FeedPostsStatsResponse.new } + let(:instance) { FastCommentsClient::FeedPostsStatsResponse.new } describe 'test an instance of FeedPostsStatsResponse' do it 'should create an instance of FeedPostsStatsResponse' do diff --git a/client/spec/models/find_comments_by_range_item_spec.rb b/client/spec/models/find_comments_by_range_item_spec.rb index d757242..64f719f 100644 --- a/client/spec/models/find_comments_by_range_item_spec.rb +++ b/client/spec/models/find_comments_by_range_item_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::FindCommentsByRangeItem do - #let(:instance) { FastCommentsClient::FindCommentsByRangeItem.new } + let(:instance) { FastCommentsClient::FindCommentsByRangeItem.new } describe 'test an instance of FindCommentsByRangeItem' do it 'should create an instance of FindCommentsByRangeItem' do diff --git a/client/spec/models/find_comments_by_range_response_spec.rb b/client/spec/models/find_comments_by_range_response_spec.rb index cd637bd..976ddb0 100644 --- a/client/spec/models/find_comments_by_range_response_spec.rb +++ b/client/spec/models/find_comments_by_range_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::FindCommentsByRangeResponse do - #let(:instance) { FastCommentsClient::FindCommentsByRangeResponse.new } + let(:instance) { FastCommentsClient::FindCommentsByRangeResponse.new } describe 'test an instance of FindCommentsByRangeResponse' do it 'should create an instance of FindCommentsByRangeResponse' do diff --git a/client/spec/models/flag_comment200_response_spec.rb b/client/spec/models/flag_comment200_response_spec.rb deleted file mode 100644 index 3657e24..0000000 --- a/client/spec/models/flag_comment200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::FlagComment200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::FlagComment200Response do -end diff --git a/client/spec/models/flag_comment_public200_response_spec.rb b/client/spec/models/flag_comment_public200_response_spec.rb deleted file mode 100644 index b5e7f6b..0000000 --- a/client/spec/models/flag_comment_public200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::FlagCommentPublic200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::FlagCommentPublic200Response do -end diff --git a/client/spec/models/flag_comment_response_spec.rb b/client/spec/models/flag_comment_response_spec.rb index 21a393e..e4b4832 100644 --- a/client/spec/models/flag_comment_response_spec.rb +++ b/client/spec/models/flag_comment_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::FlagCommentResponse do - #let(:instance) { FastCommentsClient::FlagCommentResponse.new } + let(:instance) { FastCommentsClient::FlagCommentResponse.new } describe 'test an instance of FlagCommentResponse' do it 'should create an instance of FlagCommentResponse' do diff --git a/client/spec/models/get_audit_logs200_response_spec.rb b/client/spec/models/get_audit_logs200_response_spec.rb deleted file mode 100644 index 8f7de92..0000000 --- a/client/spec/models/get_audit_logs200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetAuditLogs200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetAuditLogs200Response do -end diff --git a/client/spec/models/get_audit_logs_response_spec.rb b/client/spec/models/get_audit_logs_response_spec.rb index c1bb386..10a212d 100644 --- a/client/spec/models/get_audit_logs_response_spec.rb +++ b/client/spec/models/get_audit_logs_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetAuditLogsResponse do - #let(:instance) { FastCommentsClient::GetAuditLogsResponse.new } + let(:instance) { FastCommentsClient::GetAuditLogsResponse.new } describe 'test an instance of GetAuditLogsResponse' do it 'should create an instance of GetAuditLogsResponse' do diff --git a/client/spec/models/get_banned_users_count_response_spec.rb b/client/spec/models/get_banned_users_count_response_spec.rb new file mode 100644 index 0000000..e637f47 --- /dev/null +++ b/client/spec/models/get_banned_users_count_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GetBannedUsersCountResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GetBannedUsersCountResponse do + let(:instance) { FastCommentsClient::GetBannedUsersCountResponse.new } + + describe 'test an instance of GetBannedUsersCountResponse' do + it 'should create an instance of GetBannedUsersCountResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GetBannedUsersCountResponse) + end + end + + describe 'test attribute "total_count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/get_banned_users_from_comment_response_spec.rb b/client/spec/models/get_banned_users_from_comment_response_spec.rb new file mode 100644 index 0000000..c416933 --- /dev/null +++ b/client/spec/models/get_banned_users_from_comment_response_spec.rb @@ -0,0 +1,52 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GetBannedUsersFromCommentResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GetBannedUsersFromCommentResponse do + let(:instance) { FastCommentsClient::GetBannedUsersFromCommentResponse.new } + + describe 'test an instance of GetBannedUsersFromCommentResponse' do + it 'should create an instance of GetBannedUsersFromCommentResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GetBannedUsersFromCommentResponse) + end + end + + describe 'test attribute "banned_users"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["not-found", "not-logged-in"]) + # validator.allowable_values.each do |value| + # expect { instance.code = value }.not_to raise_error + # end + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/get_cached_notification_count200_response_spec.rb b/client/spec/models/get_cached_notification_count200_response_spec.rb deleted file mode 100644 index 8072190..0000000 --- a/client/spec/models/get_cached_notification_count200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetCachedNotificationCount200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetCachedNotificationCount200Response do -end diff --git a/client/spec/models/get_cached_notification_count_response_spec.rb b/client/spec/models/get_cached_notification_count_response_spec.rb index ec72dfb..bcc01b7 100644 --- a/client/spec/models/get_cached_notification_count_response_spec.rb +++ b/client/spec/models/get_cached_notification_count_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetCachedNotificationCountResponse do - #let(:instance) { FastCommentsClient::GetCachedNotificationCountResponse.new } + let(:instance) { FastCommentsClient::GetCachedNotificationCountResponse.new } describe 'test an instance of GetCachedNotificationCountResponse' do it 'should create an instance of GetCachedNotificationCountResponse' do diff --git a/client/spec/models/get_comment200_response_spec.rb b/client/spec/models/get_comment200_response_spec.rb deleted file mode 100644 index 455ef83..0000000 --- a/client/spec/models/get_comment200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetComment200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetComment200Response do -end diff --git a/client/spec/models/get_comment_ban_status_response_spec.rb b/client/spec/models/get_comment_ban_status_response_spec.rb new file mode 100644 index 0000000..900d678 --- /dev/null +++ b/client/spec/models/get_comment_ban_status_response_spec.rb @@ -0,0 +1,48 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GetCommentBanStatusResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GetCommentBanStatusResponse do + let(:instance) { FastCommentsClient::GetCommentBanStatusResponse.new } + + describe 'test an instance of GetCommentBanStatusResponse' do + it 'should create an instance of GetCommentBanStatusResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GetCommentBanStatusResponse) + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "email_domain"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "can_ip_ban"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/get_comment_text200_response_spec.rb b/client/spec/models/get_comment_text200_response_spec.rb deleted file mode 100644 index 604d4dd..0000000 --- a/client/spec/models/get_comment_text200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetCommentText200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetCommentText200Response do -end diff --git a/client/spec/models/get_comment_text_response_spec.rb b/client/spec/models/get_comment_text_response_spec.rb new file mode 100644 index 0000000..4297e6a --- /dev/null +++ b/client/spec/models/get_comment_text_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GetCommentTextResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GetCommentTextResponse do + let(:instance) { FastCommentsClient::GetCommentTextResponse.new } + + describe 'test an instance of GetCommentTextResponse' do + it 'should create an instance of GetCommentTextResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GetCommentTextResponse) + end + end + + describe 'test attribute "comment"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/get_comment_vote_user_names200_response_spec.rb b/client/spec/models/get_comment_vote_user_names200_response_spec.rb deleted file mode 100644 index c2d5678..0000000 --- a/client/spec/models/get_comment_vote_user_names200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetCommentVoteUserNames200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetCommentVoteUserNames200Response do -end diff --git a/client/spec/models/get_comment_vote_user_names_success_response_spec.rb b/client/spec/models/get_comment_vote_user_names_success_response_spec.rb index d104290..9f53d5d 100644 --- a/client/spec/models/get_comment_vote_user_names_success_response_spec.rb +++ b/client/spec/models/get_comment_vote_user_names_success_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetCommentVoteUserNamesSuccessResponse do - #let(:instance) { FastCommentsClient::GetCommentVoteUserNamesSuccessResponse.new } + let(:instance) { FastCommentsClient::GetCommentVoteUserNamesSuccessResponse.new } describe 'test an instance of GetCommentVoteUserNamesSuccessResponse' do it 'should create an instance of GetCommentVoteUserNamesSuccessResponse' do diff --git a/client/spec/models/get_comments200_response_spec.rb b/client/spec/models/get_comments200_response_spec.rb deleted file mode 100644 index d841024..0000000 --- a/client/spec/models/get_comments200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetComments200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetComments200Response do -end diff --git a/client/spec/models/get_comments_for_user_response_spec.rb b/client/spec/models/get_comments_for_user_response_spec.rb new file mode 100644 index 0000000..c45dd17 --- /dev/null +++ b/client/spec/models/get_comments_for_user_response_spec.rb @@ -0,0 +1,36 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GetCommentsForUserResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GetCommentsForUserResponse do + let(:instance) { FastCommentsClient::GetCommentsForUserResponse.new } + + describe 'test an instance of GetCommentsForUserResponse' do + it 'should create an instance of GetCommentsForUserResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GetCommentsForUserResponse) + end + end + + describe 'test attribute "moderating_tenant_ids"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/get_comments_public200_response_spec.rb b/client/spec/models/get_comments_public200_response_spec.rb deleted file mode 100644 index d09a10d..0000000 --- a/client/spec/models/get_comments_public200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetCommentsPublic200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetCommentsPublic200Response do -end diff --git a/client/spec/models/get_comments_response_public_comment_spec.rb b/client/spec/models/get_comments_response_public_comment_spec.rb index d6e7686..a9bc205 100644 --- a/client/spec/models/get_comments_response_public_comment_spec.rb +++ b/client/spec/models/get_comments_response_public_comment_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetCommentsResponsePublicComment do - #let(:instance) { FastCommentsClient::GetCommentsResponsePublicComment.new } + let(:instance) { FastCommentsClient::GetCommentsResponsePublicComment.new } describe 'test an instance of GetCommentsResponsePublicComment' do it 'should create an instance of GetCommentsResponsePublicComment' do diff --git a/client/spec/models/get_comments_response_with_presence_public_comment_spec.rb b/client/spec/models/get_comments_response_with_presence_public_comment_spec.rb index e9927d1..b9c363a 100644 --- a/client/spec/models/get_comments_response_with_presence_public_comment_spec.rb +++ b/client/spec/models/get_comments_response_with_presence_public_comment_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetCommentsResponseWithPresencePublicComment do - #let(:instance) { FastCommentsClient::GetCommentsResponseWithPresencePublicComment.new } + let(:instance) { FastCommentsClient::GetCommentsResponseWithPresencePublicComment.new } describe 'test an instance of GetCommentsResponseWithPresencePublicComment' do it 'should create an instance of GetCommentsResponseWithPresencePublicComment' do diff --git a/client/spec/models/get_domain_config200_response_spec.rb b/client/spec/models/get_domain_config200_response_spec.rb deleted file mode 100644 index 80eb939..0000000 --- a/client/spec/models/get_domain_config200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetDomainConfig200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetDomainConfig200Response do -end diff --git a/client/spec/models/get_ticket200_response_spec.rb b/client/spec/models/get_domain_config_response_spec.rb similarity index 73% rename from client/spec/models/get_ticket200_response_spec.rb rename to client/spec/models/get_domain_config_response_spec.rb index 56bcbdf..7c5b7de 100644 --- a/client/spec/models/get_ticket200_response_spec.rb +++ b/client/spec/models/get_domain_config_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,8 +14,8 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::GetTicket200Response +# Unit tests for FastCommentsClient::GetDomainConfigResponse # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::GetTicket200Response do +describe FastCommentsClient::GetDomainConfigResponse do end diff --git a/client/spec/models/get_domain_configs200_response_spec.rb b/client/spec/models/get_domain_configs200_response_spec.rb deleted file mode 100644 index dd651da..0000000 --- a/client/spec/models/get_domain_configs200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetDomainConfigs200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetDomainConfigs200Response do -end diff --git a/client/spec/models/get_domain_configs200_response_any_of1_spec.rb b/client/spec/models/get_domain_configs_response_any_of1_spec.rb similarity index 71% rename from client/spec/models/get_domain_configs200_response_any_of1_spec.rb rename to client/spec/models/get_domain_configs_response_any_of1_spec.rb index 92e63a0..fc79d36 100644 --- a/client/spec/models/get_domain_configs200_response_any_of1_spec.rb +++ b/client/spec/models/get_domain_configs_response_any_of1_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,16 +14,16 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::GetDomainConfigs200ResponseAnyOf1 +# Unit tests for FastCommentsClient::GetDomainConfigsResponseAnyOf1 # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::GetDomainConfigs200ResponseAnyOf1 do - #let(:instance) { FastCommentsClient::GetDomainConfigs200ResponseAnyOf1.new } +describe FastCommentsClient::GetDomainConfigsResponseAnyOf1 do + let(:instance) { FastCommentsClient::GetDomainConfigsResponseAnyOf1.new } - describe 'test an instance of GetDomainConfigs200ResponseAnyOf1' do - it 'should create an instance of GetDomainConfigs200ResponseAnyOf1' do + describe 'test an instance of GetDomainConfigsResponseAnyOf1' do + it 'should create an instance of GetDomainConfigsResponseAnyOf1' do # uncomment below to test the instance creation - #expect(instance).to be_instance_of(FastCommentsClient::GetDomainConfigs200ResponseAnyOf1) + #expect(instance).to be_instance_of(FastCommentsClient::GetDomainConfigsResponseAnyOf1) end end diff --git a/client/spec/models/get_domain_configs200_response_any_of_spec.rb b/client/spec/models/get_domain_configs_response_any_of_spec.rb similarity index 68% rename from client/spec/models/get_domain_configs200_response_any_of_spec.rb rename to client/spec/models/get_domain_configs_response_any_of_spec.rb index 54bcbba..9ba34f5 100644 --- a/client/spec/models/get_domain_configs200_response_any_of_spec.rb +++ b/client/spec/models/get_domain_configs_response_any_of_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,16 +14,16 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::GetDomainConfigs200ResponseAnyOf +# Unit tests for FastCommentsClient::GetDomainConfigsResponseAnyOf # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::GetDomainConfigs200ResponseAnyOf do - #let(:instance) { FastCommentsClient::GetDomainConfigs200ResponseAnyOf.new } +describe FastCommentsClient::GetDomainConfigsResponseAnyOf do + let(:instance) { FastCommentsClient::GetDomainConfigsResponseAnyOf.new } - describe 'test an instance of GetDomainConfigs200ResponseAnyOf' do - it 'should create an instance of GetDomainConfigs200ResponseAnyOf' do + describe 'test an instance of GetDomainConfigsResponseAnyOf' do + it 'should create an instance of GetDomainConfigsResponseAnyOf' do # uncomment below to test the instance creation - #expect(instance).to be_instance_of(FastCommentsClient::GetDomainConfigs200ResponseAnyOf) + #expect(instance).to be_instance_of(FastCommentsClient::GetDomainConfigsResponseAnyOf) end end diff --git a/client/spec/models/get_tenant200_response_spec.rb b/client/spec/models/get_domain_configs_response_spec.rb similarity index 73% rename from client/spec/models/get_tenant200_response_spec.rb rename to client/spec/models/get_domain_configs_response_spec.rb index bc97e18..ae5f967 100644 --- a/client/spec/models/get_tenant200_response_spec.rb +++ b/client/spec/models/get_domain_configs_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,8 +14,8 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::GetTenant200Response +# Unit tests for FastCommentsClient::GetDomainConfigsResponse # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::GetTenant200Response do +describe FastCommentsClient::GetDomainConfigsResponse do end diff --git a/client/spec/models/get_email_template200_response_spec.rb b/client/spec/models/get_email_template200_response_spec.rb deleted file mode 100644 index 06682c1..0000000 --- a/client/spec/models/get_email_template200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetEmailTemplate200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetEmailTemplate200Response do -end diff --git a/client/spec/models/get_email_template_definitions200_response_spec.rb b/client/spec/models/get_email_template_definitions200_response_spec.rb deleted file mode 100644 index edd8a1c..0000000 --- a/client/spec/models/get_email_template_definitions200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetEmailTemplateDefinitions200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetEmailTemplateDefinitions200Response do -end diff --git a/client/spec/models/get_email_template_definitions_response_spec.rb b/client/spec/models/get_email_template_definitions_response_spec.rb index a1e35e1..ac22825 100644 --- a/client/spec/models/get_email_template_definitions_response_spec.rb +++ b/client/spec/models/get_email_template_definitions_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetEmailTemplateDefinitionsResponse do - #let(:instance) { FastCommentsClient::GetEmailTemplateDefinitionsResponse.new } + let(:instance) { FastCommentsClient::GetEmailTemplateDefinitionsResponse.new } describe 'test an instance of GetEmailTemplateDefinitionsResponse' do it 'should create an instance of GetEmailTemplateDefinitionsResponse' do diff --git a/client/spec/models/get_email_template_render_errors200_response_spec.rb b/client/spec/models/get_email_template_render_errors200_response_spec.rb deleted file mode 100644 index f9cbf67..0000000 --- a/client/spec/models/get_email_template_render_errors200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetEmailTemplateRenderErrors200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetEmailTemplateRenderErrors200Response do -end diff --git a/client/spec/models/get_email_template_render_errors_response_spec.rb b/client/spec/models/get_email_template_render_errors_response_spec.rb index 1ce0da9..1796efb 100644 --- a/client/spec/models/get_email_template_render_errors_response_spec.rb +++ b/client/spec/models/get_email_template_render_errors_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetEmailTemplateRenderErrorsResponse do - #let(:instance) { FastCommentsClient::GetEmailTemplateRenderErrorsResponse.new } + let(:instance) { FastCommentsClient::GetEmailTemplateRenderErrorsResponse.new } describe 'test an instance of GetEmailTemplateRenderErrorsResponse' do it 'should create an instance of GetEmailTemplateRenderErrorsResponse' do diff --git a/client/spec/models/get_email_template_response_spec.rb b/client/spec/models/get_email_template_response_spec.rb index c187180..6d38c04 100644 --- a/client/spec/models/get_email_template_response_spec.rb +++ b/client/spec/models/get_email_template_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetEmailTemplateResponse do - #let(:instance) { FastCommentsClient::GetEmailTemplateResponse.new } + let(:instance) { FastCommentsClient::GetEmailTemplateResponse.new } describe 'test an instance of GetEmailTemplateResponse' do it 'should create an instance of GetEmailTemplateResponse' do diff --git a/client/spec/models/get_email_templates200_response_spec.rb b/client/spec/models/get_email_templates200_response_spec.rb deleted file mode 100644 index 30387cb..0000000 --- a/client/spec/models/get_email_templates200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetEmailTemplates200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetEmailTemplates200Response do -end diff --git a/client/spec/models/get_email_templates_response_spec.rb b/client/spec/models/get_email_templates_response_spec.rb index 70fe473..4f7e42a 100644 --- a/client/spec/models/get_email_templates_response_spec.rb +++ b/client/spec/models/get_email_templates_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetEmailTemplatesResponse do - #let(:instance) { FastCommentsClient::GetEmailTemplatesResponse.new } + let(:instance) { FastCommentsClient::GetEmailTemplatesResponse.new } describe 'test an instance of GetEmailTemplatesResponse' do it 'should create an instance of GetEmailTemplatesResponse' do diff --git a/client/spec/models/get_event_log200_response_spec.rb b/client/spec/models/get_event_log200_response_spec.rb deleted file mode 100644 index 696bcd7..0000000 --- a/client/spec/models/get_event_log200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetEventLog200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetEventLog200Response do -end diff --git a/client/spec/models/get_event_log_response_spec.rb b/client/spec/models/get_event_log_response_spec.rb index b664dc5..d4e771f 100644 --- a/client/spec/models/get_event_log_response_spec.rb +++ b/client/spec/models/get_event_log_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetEventLogResponse do - #let(:instance) { FastCommentsClient::GetEventLogResponse.new } + let(:instance) { FastCommentsClient::GetEventLogResponse.new } describe 'test an instance of GetEventLogResponse' do it 'should create an instance of GetEventLogResponse' do diff --git a/client/spec/models/get_feed_posts200_response_spec.rb b/client/spec/models/get_feed_posts200_response_spec.rb deleted file mode 100644 index b8b10ef..0000000 --- a/client/spec/models/get_feed_posts200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetFeedPosts200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetFeedPosts200Response do -end diff --git a/client/spec/models/get_feed_posts_public200_response_spec.rb b/client/spec/models/get_feed_posts_public200_response_spec.rb deleted file mode 100644 index 93e2b4f..0000000 --- a/client/spec/models/get_feed_posts_public200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetFeedPostsPublic200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetFeedPostsPublic200Response do -end diff --git a/client/spec/models/get_feed_posts_response_spec.rb b/client/spec/models/get_feed_posts_response_spec.rb index 460d2c1..b5f05ea 100644 --- a/client/spec/models/get_feed_posts_response_spec.rb +++ b/client/spec/models/get_feed_posts_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetFeedPostsResponse do - #let(:instance) { FastCommentsClient::GetFeedPostsResponse.new } + let(:instance) { FastCommentsClient::GetFeedPostsResponse.new } describe 'test an instance of GetFeedPostsResponse' do it 'should create an instance of GetFeedPostsResponse' do diff --git a/client/spec/models/get_feed_posts_stats200_response_spec.rb b/client/spec/models/get_feed_posts_stats200_response_spec.rb deleted file mode 100644 index a80dfa5..0000000 --- a/client/spec/models/get_feed_posts_stats200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetFeedPostsStats200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetFeedPostsStats200Response do -end diff --git a/client/spec/models/get_gifs_search_response_spec.rb b/client/spec/models/get_gifs_search_response_spec.rb new file mode 100644 index 0000000..bc64397 --- /dev/null +++ b/client/spec/models/get_gifs_search_response_spec.rb @@ -0,0 +1,21 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GetGifsSearchResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GetGifsSearchResponse do +end diff --git a/client/spec/models/get_gifs_trending_response_spec.rb b/client/spec/models/get_gifs_trending_response_spec.rb new file mode 100644 index 0000000..b6250dd --- /dev/null +++ b/client/spec/models/get_gifs_trending_response_spec.rb @@ -0,0 +1,21 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GetGifsTrendingResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GetGifsTrendingResponse do +end diff --git a/client/spec/models/get_hash_tags200_response_spec.rb b/client/spec/models/get_hash_tags200_response_spec.rb deleted file mode 100644 index 5378d27..0000000 --- a/client/spec/models/get_hash_tags200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetHashTags200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetHashTags200Response do -end diff --git a/client/spec/models/get_hash_tags_response_spec.rb b/client/spec/models/get_hash_tags_response_spec.rb index aacca4f..d4d776b 100644 --- a/client/spec/models/get_hash_tags_response_spec.rb +++ b/client/spec/models/get_hash_tags_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetHashTagsResponse do - #let(:instance) { FastCommentsClient::GetHashTagsResponse.new } + let(:instance) { FastCommentsClient::GetHashTagsResponse.new } describe 'test an instance of GetHashTagsResponse' do it 'should create an instance of GetHashTagsResponse' do diff --git a/client/spec/models/get_moderator200_response_spec.rb b/client/spec/models/get_moderator200_response_spec.rb deleted file mode 100644 index be741d0..0000000 --- a/client/spec/models/get_moderator200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetModerator200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetModerator200Response do -end diff --git a/client/spec/models/get_moderator_response_spec.rb b/client/spec/models/get_moderator_response_spec.rb index 6245d28..48d713c 100644 --- a/client/spec/models/get_moderator_response_spec.rb +++ b/client/spec/models/get_moderator_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetModeratorResponse do - #let(:instance) { FastCommentsClient::GetModeratorResponse.new } + let(:instance) { FastCommentsClient::GetModeratorResponse.new } describe 'test an instance of GetModeratorResponse' do it 'should create an instance of GetModeratorResponse' do diff --git a/client/spec/models/get_moderators200_response_spec.rb b/client/spec/models/get_moderators200_response_spec.rb deleted file mode 100644 index 6289751..0000000 --- a/client/spec/models/get_moderators200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetModerators200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetModerators200Response do -end diff --git a/client/spec/models/get_moderators_response_spec.rb b/client/spec/models/get_moderators_response_spec.rb index 2a543e3..f3cf1cb 100644 --- a/client/spec/models/get_moderators_response_spec.rb +++ b/client/spec/models/get_moderators_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetModeratorsResponse do - #let(:instance) { FastCommentsClient::GetModeratorsResponse.new } + let(:instance) { FastCommentsClient::GetModeratorsResponse.new } describe 'test an instance of GetModeratorsResponse' do it 'should create an instance of GetModeratorsResponse' do diff --git a/client/spec/models/get_my_notifications_response_spec.rb b/client/spec/models/get_my_notifications_response_spec.rb index 2bb7c1a..e26d8ef 100644 --- a/client/spec/models/get_my_notifications_response_spec.rb +++ b/client/spec/models/get_my_notifications_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetMyNotificationsResponse do - #let(:instance) { FastCommentsClient::GetMyNotificationsResponse.new } + let(:instance) { FastCommentsClient::GetMyNotificationsResponse.new } describe 'test an instance of GetMyNotificationsResponse' do it 'should create an instance of GetMyNotificationsResponse' do diff --git a/client/spec/models/get_notification_count200_response_spec.rb b/client/spec/models/get_notification_count200_response_spec.rb deleted file mode 100644 index 7832dd3..0000000 --- a/client/spec/models/get_notification_count200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetNotificationCount200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetNotificationCount200Response do -end diff --git a/client/spec/models/get_notification_count_response_spec.rb b/client/spec/models/get_notification_count_response_spec.rb index 2c1d489..c434c4e 100644 --- a/client/spec/models/get_notification_count_response_spec.rb +++ b/client/spec/models/get_notification_count_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetNotificationCountResponse do - #let(:instance) { FastCommentsClient::GetNotificationCountResponse.new } + let(:instance) { FastCommentsClient::GetNotificationCountResponse.new } describe 'test an instance of GetNotificationCountResponse' do it 'should create an instance of GetNotificationCountResponse' do diff --git a/client/spec/models/get_notifications200_response_spec.rb b/client/spec/models/get_notifications200_response_spec.rb deleted file mode 100644 index 0804162..0000000 --- a/client/spec/models/get_notifications200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetNotifications200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetNotifications200Response do -end diff --git a/client/spec/models/get_notifications_response_spec.rb b/client/spec/models/get_notifications_response_spec.rb index 4933b65..f6aa082 100644 --- a/client/spec/models/get_notifications_response_spec.rb +++ b/client/spec/models/get_notifications_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetNotificationsResponse do - #let(:instance) { FastCommentsClient::GetNotificationsResponse.new } + let(:instance) { FastCommentsClient::GetNotificationsResponse.new } describe 'test an instance of GetNotificationsResponse' do it 'should create an instance of GetNotificationsResponse' do diff --git a/client/spec/models/get_page_by_urlid_api_response_spec.rb b/client/spec/models/get_page_by_urlid_api_response_spec.rb index 558c3ef..1e32ec7 100644 --- a/client/spec/models/get_page_by_urlid_api_response_spec.rb +++ b/client/spec/models/get_page_by_urlid_api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetPageByURLIdAPIResponse do - #let(:instance) { FastCommentsClient::GetPageByURLIdAPIResponse.new } + let(:instance) { FastCommentsClient::GetPageByURLIdAPIResponse.new } describe 'test an instance of GetPageByURLIdAPIResponse' do it 'should create an instance of GetPageByURLIdAPIResponse' do diff --git a/client/spec/models/get_pages_api_response_spec.rb b/client/spec/models/get_pages_api_response_spec.rb index caf4e77..54937ad 100644 --- a/client/spec/models/get_pages_api_response_spec.rb +++ b/client/spec/models/get_pages_api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetPagesAPIResponse do - #let(:instance) { FastCommentsClient::GetPagesAPIResponse.new } + let(:instance) { FastCommentsClient::GetPagesAPIResponse.new } describe 'test an instance of GetPagesAPIResponse' do it 'should create an instance of GetPagesAPIResponse' do diff --git a/client/spec/models/get_pending_webhook_event_count200_response_spec.rb b/client/spec/models/get_pending_webhook_event_count200_response_spec.rb deleted file mode 100644 index cf7b86a..0000000 --- a/client/spec/models/get_pending_webhook_event_count200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetPendingWebhookEventCount200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetPendingWebhookEventCount200Response do -end diff --git a/client/spec/models/get_pending_webhook_event_count_response_spec.rb b/client/spec/models/get_pending_webhook_event_count_response_spec.rb index f979965..713a605 100644 --- a/client/spec/models/get_pending_webhook_event_count_response_spec.rb +++ b/client/spec/models/get_pending_webhook_event_count_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetPendingWebhookEventCountResponse do - #let(:instance) { FastCommentsClient::GetPendingWebhookEventCountResponse.new } + let(:instance) { FastCommentsClient::GetPendingWebhookEventCountResponse.new } describe 'test an instance of GetPendingWebhookEventCountResponse' do it 'should create an instance of GetPendingWebhookEventCountResponse' do diff --git a/client/spec/models/get_pending_webhook_events200_response_spec.rb b/client/spec/models/get_pending_webhook_events200_response_spec.rb deleted file mode 100644 index 0a61002..0000000 --- a/client/spec/models/get_pending_webhook_events200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetPendingWebhookEvents200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetPendingWebhookEvents200Response do -end diff --git a/client/spec/models/get_pending_webhook_events_response_spec.rb b/client/spec/models/get_pending_webhook_events_response_spec.rb index 340cde4..14c892d 100644 --- a/client/spec/models/get_pending_webhook_events_response_spec.rb +++ b/client/spec/models/get_pending_webhook_events_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetPendingWebhookEventsResponse do - #let(:instance) { FastCommentsClient::GetPendingWebhookEventsResponse.new } + let(:instance) { FastCommentsClient::GetPendingWebhookEventsResponse.new } describe 'test an instance of GetPendingWebhookEventsResponse' do it 'should create an instance of GetPendingWebhookEventsResponse' do diff --git a/client/spec/models/get_public_feed_posts_response_spec.rb b/client/spec/models/get_public_feed_posts_response_spec.rb index 6074712..21963a9 100644 --- a/client/spec/models/get_public_feed_posts_response_spec.rb +++ b/client/spec/models/get_public_feed_posts_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetPublicFeedPostsResponse do - #let(:instance) { FastCommentsClient::GetPublicFeedPostsResponse.new } + let(:instance) { FastCommentsClient::GetPublicFeedPostsResponse.new } describe 'test an instance of GetPublicFeedPostsResponse' do it 'should create an instance of GetPublicFeedPostsResponse' do diff --git a/client/spec/models/get_public_pages_response_spec.rb b/client/spec/models/get_public_pages_response_spec.rb new file mode 100644 index 0000000..bc1dd7a --- /dev/null +++ b/client/spec/models/get_public_pages_response_spec.rb @@ -0,0 +1,48 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GetPublicPagesResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GetPublicPagesResponse do + let(:instance) { FastCommentsClient::GetPublicPagesResponse.new } + + describe 'test an instance of GetPublicPagesResponse' do + it 'should create an instance of GetPublicPagesResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GetPublicPagesResponse) + end + end + + describe 'test attribute "next_cursor"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "pages"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/get_question_config200_response_spec.rb b/client/spec/models/get_question_config200_response_spec.rb deleted file mode 100644 index 30422f3..0000000 --- a/client/spec/models/get_question_config200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetQuestionConfig200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetQuestionConfig200Response do -end diff --git a/client/spec/models/get_question_config_response_spec.rb b/client/spec/models/get_question_config_response_spec.rb index 99a1699..d3d1bc3 100644 --- a/client/spec/models/get_question_config_response_spec.rb +++ b/client/spec/models/get_question_config_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetQuestionConfigResponse do - #let(:instance) { FastCommentsClient::GetQuestionConfigResponse.new } + let(:instance) { FastCommentsClient::GetQuestionConfigResponse.new } describe 'test an instance of GetQuestionConfigResponse' do it 'should create an instance of GetQuestionConfigResponse' do diff --git a/client/spec/models/get_question_configs200_response_spec.rb b/client/spec/models/get_question_configs200_response_spec.rb deleted file mode 100644 index e0f7bb4..0000000 --- a/client/spec/models/get_question_configs200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetQuestionConfigs200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetQuestionConfigs200Response do -end diff --git a/client/spec/models/get_question_configs_response_spec.rb b/client/spec/models/get_question_configs_response_spec.rb index d52dcad..84ef05f 100644 --- a/client/spec/models/get_question_configs_response_spec.rb +++ b/client/spec/models/get_question_configs_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetQuestionConfigsResponse do - #let(:instance) { FastCommentsClient::GetQuestionConfigsResponse.new } + let(:instance) { FastCommentsClient::GetQuestionConfigsResponse.new } describe 'test an instance of GetQuestionConfigsResponse' do it 'should create an instance of GetQuestionConfigsResponse' do diff --git a/client/spec/models/get_question_result200_response_spec.rb b/client/spec/models/get_question_result200_response_spec.rb deleted file mode 100644 index 44a0fdc..0000000 --- a/client/spec/models/get_question_result200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetQuestionResult200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetQuestionResult200Response do -end diff --git a/client/spec/models/get_question_result_response_spec.rb b/client/spec/models/get_question_result_response_spec.rb index 51e827b..a99bf43 100644 --- a/client/spec/models/get_question_result_response_spec.rb +++ b/client/spec/models/get_question_result_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetQuestionResultResponse do - #let(:instance) { FastCommentsClient::GetQuestionResultResponse.new } + let(:instance) { FastCommentsClient::GetQuestionResultResponse.new } describe 'test an instance of GetQuestionResultResponse' do it 'should create an instance of GetQuestionResultResponse' do diff --git a/client/spec/models/get_question_results200_response_spec.rb b/client/spec/models/get_question_results200_response_spec.rb deleted file mode 100644 index 95ad1cc..0000000 --- a/client/spec/models/get_question_results200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetQuestionResults200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetQuestionResults200Response do -end diff --git a/client/spec/models/get_question_results_response_spec.rb b/client/spec/models/get_question_results_response_spec.rb index 3e659c8..a4858a2 100644 --- a/client/spec/models/get_question_results_response_spec.rb +++ b/client/spec/models/get_question_results_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetQuestionResultsResponse do - #let(:instance) { FastCommentsClient::GetQuestionResultsResponse.new } + let(:instance) { FastCommentsClient::GetQuestionResultsResponse.new } describe 'test an instance of GetQuestionResultsResponse' do it 'should create an instance of GetQuestionResultsResponse' do diff --git a/client/spec/models/get_sso_user_by_email_api_response_spec.rb b/client/spec/models/get_sso_user_by_email_api_response_spec.rb index 738cb22..bfa9bce 100644 --- a/client/spec/models/get_sso_user_by_email_api_response_spec.rb +++ b/client/spec/models/get_sso_user_by_email_api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetSSOUserByEmailAPIResponse do - #let(:instance) { FastCommentsClient::GetSSOUserByEmailAPIResponse.new } + let(:instance) { FastCommentsClient::GetSSOUserByEmailAPIResponse.new } describe 'test an instance of GetSSOUserByEmailAPIResponse' do it 'should create an instance of GetSSOUserByEmailAPIResponse' do diff --git a/client/spec/models/get_sso_user_by_id_api_response_spec.rb b/client/spec/models/get_sso_user_by_id_api_response_spec.rb index abc4409..418d84c 100644 --- a/client/spec/models/get_sso_user_by_id_api_response_spec.rb +++ b/client/spec/models/get_sso_user_by_id_api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetSSOUserByIdAPIResponse do - #let(:instance) { FastCommentsClient::GetSSOUserByIdAPIResponse.new } + let(:instance) { FastCommentsClient::GetSSOUserByIdAPIResponse.new } describe 'test an instance of GetSSOUserByIdAPIResponse' do it 'should create an instance of GetSSOUserByIdAPIResponse' do diff --git a/client/spec/models/get_sso_users200_response_spec.rb b/client/spec/models/get_sso_users_response_spec.rb similarity index 71% rename from client/spec/models/get_sso_users200_response_spec.rb rename to client/spec/models/get_sso_users_response_spec.rb index 9b6198f..e3e474d 100644 --- a/client/spec/models/get_sso_users200_response_spec.rb +++ b/client/spec/models/get_sso_users_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,16 +14,16 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::GetSSOUsers200Response +# Unit tests for FastCommentsClient::GetSSOUsersResponse # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::GetSSOUsers200Response do - #let(:instance) { FastCommentsClient::GetSSOUsers200Response.new } +describe FastCommentsClient::GetSSOUsersResponse do + let(:instance) { FastCommentsClient::GetSSOUsersResponse.new } - describe 'test an instance of GetSSOUsers200Response' do - it 'should create an instance of GetSSOUsers200Response' do + describe 'test an instance of GetSSOUsersResponse' do + it 'should create an instance of GetSSOUsersResponse' do # uncomment below to test the instance creation - #expect(instance).to be_instance_of(FastCommentsClient::GetSSOUsers200Response) + #expect(instance).to be_instance_of(FastCommentsClient::GetSSOUsersResponse) end end diff --git a/client/spec/models/get_subscriptions_api_response_spec.rb b/client/spec/models/get_subscriptions_api_response_spec.rb index fc190fc..c3ac35b 100644 --- a/client/spec/models/get_subscriptions_api_response_spec.rb +++ b/client/spec/models/get_subscriptions_api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetSubscriptionsAPIResponse do - #let(:instance) { FastCommentsClient::GetSubscriptionsAPIResponse.new } + let(:instance) { FastCommentsClient::GetSubscriptionsAPIResponse.new } describe 'test an instance of GetSubscriptionsAPIResponse' do it 'should create an instance of GetSubscriptionsAPIResponse' do diff --git a/client/spec/models/get_tenant_daily_usages200_response_spec.rb b/client/spec/models/get_tenant_daily_usages200_response_spec.rb deleted file mode 100644 index be69317..0000000 --- a/client/spec/models/get_tenant_daily_usages200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetTenantDailyUsages200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetTenantDailyUsages200Response do -end diff --git a/client/spec/models/get_tenant_daily_usages_response_spec.rb b/client/spec/models/get_tenant_daily_usages_response_spec.rb index be489af..d623d7e 100644 --- a/client/spec/models/get_tenant_daily_usages_response_spec.rb +++ b/client/spec/models/get_tenant_daily_usages_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetTenantDailyUsagesResponse do - #let(:instance) { FastCommentsClient::GetTenantDailyUsagesResponse.new } + let(:instance) { FastCommentsClient::GetTenantDailyUsagesResponse.new } describe 'test an instance of GetTenantDailyUsagesResponse' do it 'should create an instance of GetTenantDailyUsagesResponse' do diff --git a/client/spec/models/get_tenant_manual_badges_response_spec.rb b/client/spec/models/get_tenant_manual_badges_response_spec.rb new file mode 100644 index 0000000..f6a4714 --- /dev/null +++ b/client/spec/models/get_tenant_manual_badges_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GetTenantManualBadgesResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GetTenantManualBadgesResponse do + let(:instance) { FastCommentsClient::GetTenantManualBadgesResponse.new } + + describe 'test an instance of GetTenantManualBadgesResponse' do + it 'should create an instance of GetTenantManualBadgesResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GetTenantManualBadgesResponse) + end + end + + describe 'test attribute "badges"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/get_tenant_package200_response_spec.rb b/client/spec/models/get_tenant_package200_response_spec.rb deleted file mode 100644 index c5318db..0000000 --- a/client/spec/models/get_tenant_package200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetTenantPackage200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetTenantPackage200Response do -end diff --git a/client/spec/models/get_tenant_package_response_spec.rb b/client/spec/models/get_tenant_package_response_spec.rb index f2b8b2a..9052dd8 100644 --- a/client/spec/models/get_tenant_package_response_spec.rb +++ b/client/spec/models/get_tenant_package_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetTenantPackageResponse do - #let(:instance) { FastCommentsClient::GetTenantPackageResponse.new } + let(:instance) { FastCommentsClient::GetTenantPackageResponse.new } describe 'test an instance of GetTenantPackageResponse' do it 'should create an instance of GetTenantPackageResponse' do diff --git a/client/spec/models/get_tenant_packages200_response_spec.rb b/client/spec/models/get_tenant_packages200_response_spec.rb deleted file mode 100644 index 70d902d..0000000 --- a/client/spec/models/get_tenant_packages200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetTenantPackages200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetTenantPackages200Response do -end diff --git a/client/spec/models/get_tenant_packages_response_spec.rb b/client/spec/models/get_tenant_packages_response_spec.rb index c95736d..3f687ca 100644 --- a/client/spec/models/get_tenant_packages_response_spec.rb +++ b/client/spec/models/get_tenant_packages_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetTenantPackagesResponse do - #let(:instance) { FastCommentsClient::GetTenantPackagesResponse.new } + let(:instance) { FastCommentsClient::GetTenantPackagesResponse.new } describe 'test an instance of GetTenantPackagesResponse' do it 'should create an instance of GetTenantPackagesResponse' do diff --git a/client/spec/models/get_tenant_response_spec.rb b/client/spec/models/get_tenant_response_spec.rb index 85acab0..1105dfb 100644 --- a/client/spec/models/get_tenant_response_spec.rb +++ b/client/spec/models/get_tenant_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetTenantResponse do - #let(:instance) { FastCommentsClient::GetTenantResponse.new } + let(:instance) { FastCommentsClient::GetTenantResponse.new } describe 'test an instance of GetTenantResponse' do it 'should create an instance of GetTenantResponse' do diff --git a/client/spec/models/get_tenant_user200_response_spec.rb b/client/spec/models/get_tenant_user200_response_spec.rb deleted file mode 100644 index 9dc1903..0000000 --- a/client/spec/models/get_tenant_user200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetTenantUser200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetTenantUser200Response do -end diff --git a/client/spec/models/get_tenant_user_response_spec.rb b/client/spec/models/get_tenant_user_response_spec.rb index e74872c..edd1569 100644 --- a/client/spec/models/get_tenant_user_response_spec.rb +++ b/client/spec/models/get_tenant_user_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetTenantUserResponse do - #let(:instance) { FastCommentsClient::GetTenantUserResponse.new } + let(:instance) { FastCommentsClient::GetTenantUserResponse.new } describe 'test an instance of GetTenantUserResponse' do it 'should create an instance of GetTenantUserResponse' do diff --git a/client/spec/models/get_tenant_users200_response_spec.rb b/client/spec/models/get_tenant_users200_response_spec.rb deleted file mode 100644 index dc1bffd..0000000 --- a/client/spec/models/get_tenant_users200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetTenantUsers200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetTenantUsers200Response do -end diff --git a/client/spec/models/get_tenant_users_response_spec.rb b/client/spec/models/get_tenant_users_response_spec.rb index 8beeab0..c76ef20 100644 --- a/client/spec/models/get_tenant_users_response_spec.rb +++ b/client/spec/models/get_tenant_users_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetTenantUsersResponse do - #let(:instance) { FastCommentsClient::GetTenantUsersResponse.new } + let(:instance) { FastCommentsClient::GetTenantUsersResponse.new } describe 'test an instance of GetTenantUsersResponse' do it 'should create an instance of GetTenantUsersResponse' do diff --git a/client/spec/models/get_tenants200_response_spec.rb b/client/spec/models/get_tenants200_response_spec.rb deleted file mode 100644 index 5900466..0000000 --- a/client/spec/models/get_tenants200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetTenants200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetTenants200Response do -end diff --git a/client/spec/models/get_tenants_response_spec.rb b/client/spec/models/get_tenants_response_spec.rb index a92f9a6..422f0e8 100644 --- a/client/spec/models/get_tenants_response_spec.rb +++ b/client/spec/models/get_tenants_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetTenantsResponse do - #let(:instance) { FastCommentsClient::GetTenantsResponse.new } + let(:instance) { FastCommentsClient::GetTenantsResponse.new } describe 'test an instance of GetTenantsResponse' do it 'should create an instance of GetTenantsResponse' do diff --git a/client/spec/models/get_ticket_response_spec.rb b/client/spec/models/get_ticket_response_spec.rb index 14820c4..a7656a5 100644 --- a/client/spec/models/get_ticket_response_spec.rb +++ b/client/spec/models/get_ticket_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetTicketResponse do - #let(:instance) { FastCommentsClient::GetTicketResponse.new } + let(:instance) { FastCommentsClient::GetTicketResponse.new } describe 'test an instance of GetTicketResponse' do it 'should create an instance of GetTicketResponse' do diff --git a/client/spec/models/get_tickets200_response_spec.rb b/client/spec/models/get_tickets200_response_spec.rb deleted file mode 100644 index 3239f3a..0000000 --- a/client/spec/models/get_tickets200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetTickets200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetTickets200Response do -end diff --git a/client/spec/models/get_tickets_response_spec.rb b/client/spec/models/get_tickets_response_spec.rb index 1f25a4f..8a26287 100644 --- a/client/spec/models/get_tickets_response_spec.rb +++ b/client/spec/models/get_tickets_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetTicketsResponse do - #let(:instance) { FastCommentsClient::GetTicketsResponse.new } + let(:instance) { FastCommentsClient::GetTicketsResponse.new } describe 'test an instance of GetTicketsResponse' do it 'should create an instance of GetTicketsResponse' do diff --git a/client/spec/models/get_translations_response_spec.rb b/client/spec/models/get_translations_response_spec.rb new file mode 100644 index 0000000..5abd783 --- /dev/null +++ b/client/spec/models/get_translations_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GetTranslationsResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GetTranslationsResponse do + let(:instance) { FastCommentsClient::GetTranslationsResponse.new } + + describe 'test an instance of GetTranslationsResponse' do + it 'should create an instance of GetTranslationsResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GetTranslationsResponse) + end + end + + describe 'test attribute "translations"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/get_user_badge200_response_spec.rb b/client/spec/models/get_user_badge200_response_spec.rb deleted file mode 100644 index dcbd148..0000000 --- a/client/spec/models/get_user_badge200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetUserBadge200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetUserBadge200Response do -end diff --git a/client/spec/models/get_user_badge_progress_by_id200_response_spec.rb b/client/spec/models/get_user_badge_progress_by_id200_response_spec.rb deleted file mode 100644 index bca4fb5..0000000 --- a/client/spec/models/get_user_badge_progress_by_id200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetUserBadgeProgressById200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetUserBadgeProgressById200Response do -end diff --git a/client/spec/models/get_user_badge_progress_list200_response_spec.rb b/client/spec/models/get_user_badge_progress_list200_response_spec.rb deleted file mode 100644 index bf9b8c5..0000000 --- a/client/spec/models/get_user_badge_progress_list200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetUserBadgeProgressList200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetUserBadgeProgressList200Response do -end diff --git a/client/spec/models/get_user_badges200_response_spec.rb b/client/spec/models/get_user_badges200_response_spec.rb deleted file mode 100644 index 5aaedf2..0000000 --- a/client/spec/models/get_user_badges200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetUserBadges200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetUserBadges200Response do -end diff --git a/client/spec/models/get_user_internal_profile_response_profile_spec.rb b/client/spec/models/get_user_internal_profile_response_profile_spec.rb new file mode 100644 index 0000000..21beb75 --- /dev/null +++ b/client/spec/models/get_user_internal_profile_response_profile_spec.rb @@ -0,0 +1,132 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GetUserInternalProfileResponseProfile +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GetUserInternalProfileResponseProfile do + let(:instance) { FastCommentsClient::GetUserInternalProfileResponseProfile.new } + + describe 'test an instance of GetUserInternalProfileResponseProfile' do + it 'should create an instance of GetUserInternalProfileResponseProfile' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GetUserInternalProfileResponseProfile) + end + end + + describe 'test attribute "commenter_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "first_comment_date"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ip_hash"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "country_flag"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "country_code"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "website_url"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "bio"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "karma"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "locale"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "verified"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "avatar_src"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "display_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "username"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "commenter_email"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "email"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "anon_user_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "user_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/get_user_internal_profile_response_spec.rb b/client/spec/models/get_user_internal_profile_response_spec.rb new file mode 100644 index 0000000..e325e5b --- /dev/null +++ b/client/spec/models/get_user_internal_profile_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GetUserInternalProfileResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GetUserInternalProfileResponse do + let(:instance) { FastCommentsClient::GetUserInternalProfileResponse.new } + + describe 'test an instance of GetUserInternalProfileResponse' do + it 'should create an instance of GetUserInternalProfileResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GetUserInternalProfileResponse) + end + end + + describe 'test attribute "profile"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/get_user_manual_badges_response_spec.rb b/client/spec/models/get_user_manual_badges_response_spec.rb new file mode 100644 index 0000000..a07bfde --- /dev/null +++ b/client/spec/models/get_user_manual_badges_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GetUserManualBadgesResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GetUserManualBadgesResponse do + let(:instance) { FastCommentsClient::GetUserManualBadgesResponse.new } + + describe 'test an instance of GetUserManualBadgesResponse' do + it 'should create an instance of GetUserManualBadgesResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GetUserManualBadgesResponse) + end + end + + describe 'test attribute "badges"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/get_user_notification_count200_response_spec.rb b/client/spec/models/get_user_notification_count200_response_spec.rb deleted file mode 100644 index 4d28629..0000000 --- a/client/spec/models/get_user_notification_count200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetUserNotificationCount200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetUserNotificationCount200Response do -end diff --git a/client/spec/models/get_user_notification_count_response_spec.rb b/client/spec/models/get_user_notification_count_response_spec.rb index 999d089..dc995d5 100644 --- a/client/spec/models/get_user_notification_count_response_spec.rb +++ b/client/spec/models/get_user_notification_count_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetUserNotificationCountResponse do - #let(:instance) { FastCommentsClient::GetUserNotificationCountResponse.new } + let(:instance) { FastCommentsClient::GetUserNotificationCountResponse.new } describe 'test an instance of GetUserNotificationCountResponse' do it 'should create an instance of GetUserNotificationCountResponse' do diff --git a/client/spec/models/get_user_notifications200_response_spec.rb b/client/spec/models/get_user_notifications200_response_spec.rb deleted file mode 100644 index 56608cd..0000000 --- a/client/spec/models/get_user_notifications200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetUserNotifications200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetUserNotifications200Response do -end diff --git a/client/spec/models/get_user_presence_statuses200_response_spec.rb b/client/spec/models/get_user_presence_statuses200_response_spec.rb deleted file mode 100644 index 04ba579..0000000 --- a/client/spec/models/get_user_presence_statuses200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetUserPresenceStatuses200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetUserPresenceStatuses200Response do -end diff --git a/client/spec/models/get_user_presence_statuses_response_spec.rb b/client/spec/models/get_user_presence_statuses_response_spec.rb index 2769f16..42833c5 100644 --- a/client/spec/models/get_user_presence_statuses_response_spec.rb +++ b/client/spec/models/get_user_presence_statuses_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetUserPresenceStatusesResponse do - #let(:instance) { FastCommentsClient::GetUserPresenceStatusesResponse.new } + let(:instance) { FastCommentsClient::GetUserPresenceStatusesResponse.new } describe 'test an instance of GetUserPresenceStatusesResponse' do it 'should create an instance of GetUserPresenceStatusesResponse' do diff --git a/client/spec/models/get_user_reacts_public200_response_spec.rb b/client/spec/models/get_user_reacts_public200_response_spec.rb deleted file mode 100644 index 7ac7553..0000000 --- a/client/spec/models/get_user_reacts_public200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetUserReactsPublic200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetUserReactsPublic200Response do -end diff --git a/client/spec/models/get_user_response_spec.rb b/client/spec/models/get_user_response_spec.rb index 5dd783d..ea159be 100644 --- a/client/spec/models/get_user_response_spec.rb +++ b/client/spec/models/get_user_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetUserResponse do - #let(:instance) { FastCommentsClient::GetUserResponse.new } + let(:instance) { FastCommentsClient::GetUserResponse.new } describe 'test an instance of GetUserResponse' do it 'should create an instance of GetUserResponse' do diff --git a/client/spec/models/get_user_trust_factor_response_spec.rb b/client/spec/models/get_user_trust_factor_response_spec.rb new file mode 100644 index 0000000..92d0b39 --- /dev/null +++ b/client/spec/models/get_user_trust_factor_response_spec.rb @@ -0,0 +1,48 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GetUserTrustFactorResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GetUserTrustFactorResponse do + let(:instance) { FastCommentsClient::GetUserTrustFactorResponse.new } + + describe 'test an instance of GetUserTrustFactorResponse' do + it 'should create an instance of GetUserTrustFactorResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GetUserTrustFactorResponse) + end + end + + describe 'test attribute "manual_trust_factor"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "auto_trust_factor"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/get_v1_page_likes_spec.rb b/client/spec/models/get_v1_page_likes_spec.rb new file mode 100644 index 0000000..ff1818d --- /dev/null +++ b/client/spec/models/get_v1_page_likes_spec.rb @@ -0,0 +1,60 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GetV1PageLikes +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GetV1PageLikes do + let(:instance) { FastCommentsClient::GetV1PageLikes.new } + + describe 'test an instance of GetV1PageLikes' do + it 'should create an instance of GetV1PageLikes' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GetV1PageLikes) + end + end + + describe 'test attribute "url_id_ws"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "did_like"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "comment_count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "like_count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/get_v2_page_react_users_response_spec.rb b/client/spec/models/get_v2_page_react_users_response_spec.rb new file mode 100644 index 0000000..18e8005 --- /dev/null +++ b/client/spec/models/get_v2_page_react_users_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GetV2PageReactUsersResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GetV2PageReactUsersResponse do + let(:instance) { FastCommentsClient::GetV2PageReactUsersResponse.new } + + describe 'test an instance of GetV2PageReactUsersResponse' do + it 'should create an instance of GetV2PageReactUsersResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GetV2PageReactUsersResponse) + end + end + + describe 'test attribute "user_names"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/get_v2_page_reacts_spec.rb b/client/spec/models/get_v2_page_reacts_spec.rb new file mode 100644 index 0000000..0461ac6 --- /dev/null +++ b/client/spec/models/get_v2_page_reacts_spec.rb @@ -0,0 +1,48 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GetV2PageReacts +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GetV2PageReacts do + let(:instance) { FastCommentsClient::GetV2PageReacts.new } + + describe 'test an instance of GetV2PageReacts' do + it 'should create an instance of GetV2PageReacts' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GetV2PageReacts) + end + end + + describe 'test attribute "reacted_ids"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "counts"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/get_votes_for_user200_response_spec.rb b/client/spec/models/get_votes_for_user200_response_spec.rb deleted file mode 100644 index d748e4e..0000000 --- a/client/spec/models/get_votes_for_user200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::GetVotesForUser200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::GetVotesForUser200Response do -end diff --git a/client/spec/models/get_votes_for_user_response_spec.rb b/client/spec/models/get_votes_for_user_response_spec.rb index e269dd6..a8dfb63 100644 --- a/client/spec/models/get_votes_for_user_response_spec.rb +++ b/client/spec/models/get_votes_for_user_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetVotesForUserResponse do - #let(:instance) { FastCommentsClient::GetVotesForUserResponse.new } + let(:instance) { FastCommentsClient::GetVotesForUserResponse.new } describe 'test an instance of GetVotesForUserResponse' do it 'should create an instance of GetVotesForUserResponse' do diff --git a/client/spec/models/get_votes_response_spec.rb b/client/spec/models/get_votes_response_spec.rb index f5c2dc5..98c6678 100644 --- a/client/spec/models/get_votes_response_spec.rb +++ b/client/spec/models/get_votes_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GetVotesResponse do - #let(:instance) { FastCommentsClient::GetVotesResponse.new } + let(:instance) { FastCommentsClient::GetVotesResponse.new } describe 'test an instance of GetVotesResponse' do it 'should create an instance of GetVotesResponse' do diff --git a/client/spec/models/gif_get_large_response_spec.rb b/client/spec/models/gif_get_large_response_spec.rb new file mode 100644 index 0000000..4896e11 --- /dev/null +++ b/client/spec/models/gif_get_large_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GifGetLargeResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GifGetLargeResponse do + let(:instance) { FastCommentsClient::GifGetLargeResponse.new } + + describe 'test an instance of GifGetLargeResponse' do + it 'should create an instance of GifGetLargeResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GifGetLargeResponse) + end + end + + describe 'test attribute "src"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/gif_rating_spec.rb b/client/spec/models/gif_rating_spec.rb index f4ccc53..55c7fc9 100644 --- a/client/spec/models/gif_rating_spec.rb +++ b/client/spec/models/gif_rating_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::GifRating do - #let(:instance) { FastCommentsClient::GifRating.new } + let(:instance) { FastCommentsClient::GifRating.new } describe 'test an instance of GifRating' do it 'should create an instance of GifRating' do diff --git a/client/spec/models/gif_search_internal_error_spec.rb b/client/spec/models/gif_search_internal_error_spec.rb new file mode 100644 index 0000000..1a6c7b9 --- /dev/null +++ b/client/spec/models/gif_search_internal_error_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GifSearchInternalError +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GifSearchInternalError do + let(:instance) { FastCommentsClient::GifSearchInternalError.new } + + describe 'test an instance of GifSearchInternalError' do + it 'should create an instance of GifSearchInternalError' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GifSearchInternalError) + end + end + + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/add_domain_config200_response_spec.rb b/client/spec/models/gif_search_response_images_inner_inner_spec.rb similarity index 71% rename from client/spec/models/add_domain_config200_response_spec.rb rename to client/spec/models/gif_search_response_images_inner_inner_spec.rb index dbfa640..50d628e 100644 --- a/client/spec/models/add_domain_config200_response_spec.rb +++ b/client/spec/models/gif_search_response_images_inner_inner_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,8 +14,8 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::AddDomainConfig200Response +# Unit tests for FastCommentsClient::GifSearchResponseImagesInnerInner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::AddDomainConfig200Response do +describe FastCommentsClient::GifSearchResponseImagesInnerInner do end diff --git a/client/spec/models/gif_search_response_spec.rb b/client/spec/models/gif_search_response_spec.rb new file mode 100644 index 0000000..821f85d --- /dev/null +++ b/client/spec/models/gif_search_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::GifSearchResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::GifSearchResponse do + let(:instance) { FastCommentsClient::GifSearchResponse.new } + + describe 'test an instance of GifSearchResponse' do + it 'should create an instance of GifSearchResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::GifSearchResponse) + end + end + + describe 'test attribute "images"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/header_account_notification_spec.rb b/client/spec/models/header_account_notification_spec.rb index 0532508..f785562 100644 --- a/client/spec/models/header_account_notification_spec.rb +++ b/client/spec/models/header_account_notification_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::HeaderAccountNotification do - #let(:instance) { FastCommentsClient::HeaderAccountNotification.new } + let(:instance) { FastCommentsClient::HeaderAccountNotification.new } describe 'test an instance of HeaderAccountNotification' do it 'should create an instance of HeaderAccountNotification' do @@ -81,4 +81,10 @@ end end + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + end diff --git a/client/spec/models/header_state_spec.rb b/client/spec/models/header_state_spec.rb index 4dc1a71..afa83ec 100644 --- a/client/spec/models/header_state_spec.rb +++ b/client/spec/models/header_state_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::HeaderState do - #let(:instance) { FastCommentsClient::HeaderState.new } + let(:instance) { FastCommentsClient::HeaderState.new } describe 'test an instance of HeaderState' do it 'should create an instance of HeaderState' do diff --git a/client/spec/models/ignored_response_spec.rb b/client/spec/models/ignored_response_spec.rb index 7a5f13e..70a82e9 100644 --- a/client/spec/models/ignored_response_spec.rb +++ b/client/spec/models/ignored_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::IgnoredResponse do - #let(:instance) { FastCommentsClient::IgnoredResponse.new } + let(:instance) { FastCommentsClient::IgnoredResponse.new } describe 'test an instance of IgnoredResponse' do it 'should create an instance of IgnoredResponse' do diff --git a/client/spec/models/image_content_profanity_level_spec.rb b/client/spec/models/image_content_profanity_level_spec.rb index cf599f3..4b2e233 100644 --- a/client/spec/models/image_content_profanity_level_spec.rb +++ b/client/spec/models/image_content_profanity_level_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::ImageContentProfanityLevel do - #let(:instance) { FastCommentsClient::ImageContentProfanityLevel.new } + let(:instance) { FastCommentsClient::ImageContentProfanityLevel.new } describe 'test an instance of ImageContentProfanityLevel' do it 'should create an instance of ImageContentProfanityLevel' do diff --git a/client/spec/models/imported_agent_approval_notification_frequency_spec.rb b/client/spec/models/imported_agent_approval_notification_frequency_spec.rb new file mode 100644 index 0000000..599b327 --- /dev/null +++ b/client/spec/models/imported_agent_approval_notification_frequency_spec.rb @@ -0,0 +1,30 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ImportedAgentApprovalNotificationFrequency +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ImportedAgentApprovalNotificationFrequency do + let(:instance) { FastCommentsClient::ImportedAgentApprovalNotificationFrequency.new } + + describe 'test an instance of ImportedAgentApprovalNotificationFrequency' do + it 'should create an instance of ImportedAgentApprovalNotificationFrequency' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ImportedAgentApprovalNotificationFrequency) + end + end + +end diff --git a/client/spec/models/imported_site_type_spec.rb b/client/spec/models/imported_site_type_spec.rb index e6e2df4..fc057de 100644 --- a/client/spec/models/imported_site_type_spec.rb +++ b/client/spec/models/imported_site_type_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::ImportedSiteType do - #let(:instance) { FastCommentsClient::ImportedSiteType.new } + let(:instance) { FastCommentsClient::ImportedSiteType.new } describe 'test an instance of ImportedSiteType' do it 'should create an instance of ImportedSiteType' do diff --git a/client/spec/models/live_event_extra_info_spec.rb b/client/spec/models/live_event_extra_info_spec.rb index 7fff96a..8ea37a1 100644 --- a/client/spec/models/live_event_extra_info_spec.rb +++ b/client/spec/models/live_event_extra_info_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::LiveEventExtraInfo do - #let(:instance) { FastCommentsClient::LiveEventExtraInfo.new } + let(:instance) { FastCommentsClient::LiveEventExtraInfo.new } describe 'test an instance of LiveEventExtraInfo' do it 'should create an instance of LiveEventExtraInfo' do diff --git a/client/spec/models/live_event_spec.rb b/client/spec/models/live_event_spec.rb index f959733..e625a87 100644 --- a/client/spec/models/live_event_spec.rb +++ b/client/spec/models/live_event_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::LiveEvent do - #let(:instance) { FastCommentsClient::LiveEvent.new } + let(:instance) { FastCommentsClient::LiveEvent.new } describe 'test an instance of LiveEvent' do it 'should create an instance of LiveEvent' do @@ -117,6 +117,12 @@ end end + describe 'test attribute "sc"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "changes"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/client/spec/models/live_event_type_spec.rb b/client/spec/models/live_event_type_spec.rb index 64db7a2..711c4b8 100644 --- a/client/spec/models/live_event_type_spec.rb +++ b/client/spec/models/live_event_type_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::LiveEventType do - #let(:instance) { FastCommentsClient::LiveEventType.new } + let(:instance) { FastCommentsClient::LiveEventType.new } describe 'test an instance of LiveEventType' do it 'should create an instance of LiveEventType' do diff --git a/client/spec/models/lock_comment200_response_spec.rb b/client/spec/models/lock_comment200_response_spec.rb deleted file mode 100644 index 843a96e..0000000 --- a/client/spec/models/lock_comment200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::LockComment200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::LockComment200Response do -end diff --git a/client/spec/models/media_asset_spec.rb b/client/spec/models/media_asset_spec.rb index 19753e5..a763d74 100644 --- a/client/spec/models/media_asset_spec.rb +++ b/client/spec/models/media_asset_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::MediaAsset do - #let(:instance) { FastCommentsClient::MediaAsset.new } + let(:instance) { FastCommentsClient::MediaAsset.new } describe 'test an instance of MediaAsset' do it 'should create an instance of MediaAsset' do diff --git a/client/spec/models/mention_auto_complete_mode_spec.rb b/client/spec/models/mention_auto_complete_mode_spec.rb index 5eadc76..2747cd8 100644 --- a/client/spec/models/mention_auto_complete_mode_spec.rb +++ b/client/spec/models/mention_auto_complete_mode_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::MentionAutoCompleteMode do - #let(:instance) { FastCommentsClient::MentionAutoCompleteMode.new } + let(:instance) { FastCommentsClient::MentionAutoCompleteMode.new } describe 'test an instance of MentionAutoCompleteMode' do it 'should create an instance of MentionAutoCompleteMode' do diff --git a/client/spec/models/meta_item_spec.rb b/client/spec/models/meta_item_spec.rb index e491f9f..d466890 100644 --- a/client/spec/models/meta_item_spec.rb +++ b/client/spec/models/meta_item_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::MetaItem do - #let(:instance) { FastCommentsClient::MetaItem.new } + let(:instance) { FastCommentsClient::MetaItem.new } describe 'test an instance of MetaItem' do it 'should create an instance of MetaItem' do diff --git a/client/spec/models/moderation_api_child_comments_response_spec.rb b/client/spec/models/moderation_api_child_comments_response_spec.rb new file mode 100644 index 0000000..b7ba6a9 --- /dev/null +++ b/client/spec/models/moderation_api_child_comments_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationAPIChildCommentsResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationAPIChildCommentsResponse do + let(:instance) { FastCommentsClient::ModerationAPIChildCommentsResponse.new } + + describe 'test an instance of ModerationAPIChildCommentsResponse' do + it 'should create an instance of ModerationAPIChildCommentsResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationAPIChildCommentsResponse) + end + end + + describe 'test attribute "comments"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_api_comment_log_spec.rb b/client/spec/models/moderation_api_comment_log_spec.rb new file mode 100644 index 0000000..9deaa10 --- /dev/null +++ b/client/spec/models/moderation_api_comment_log_spec.rb @@ -0,0 +1,54 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationAPICommentLog +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationAPICommentLog do + let(:instance) { FastCommentsClient::ModerationAPICommentLog.new } + + describe 'test an instance of ModerationAPICommentLog' do + it 'should create an instance of ModerationAPICommentLog' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationAPICommentLog) + end + end + + describe 'test attribute "date"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "username"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "action_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "message_html"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_api_comment_response_spec.rb b/client/spec/models/moderation_api_comment_response_spec.rb new file mode 100644 index 0000000..e1f1041 --- /dev/null +++ b/client/spec/models/moderation_api_comment_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationAPICommentResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationAPICommentResponse do + let(:instance) { FastCommentsClient::ModerationAPICommentResponse.new } + + describe 'test an instance of ModerationAPICommentResponse' do + it 'should create an instance of ModerationAPICommentResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationAPICommentResponse) + end + end + + describe 'test attribute "comment"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_api_comment_spec.rb b/client/spec/models/moderation_api_comment_spec.rb new file mode 100644 index 0000000..cee50d4 --- /dev/null +++ b/client/spec/models/moderation_api_comment_spec.rb @@ -0,0 +1,282 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationAPIComment +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationAPIComment do + let(:instance) { FastCommentsClient::ModerationAPIComment.new } + + describe 'test an instance of ModerationAPIComment' do + it 'should create an instance of ModerationAPIComment' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationAPIComment) + end + end + + describe 'test attribute "is_local_deleted"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "reply_count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "feedback_results"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_voted_up"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_voted_down"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "my_vote_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tenant_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "url_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "url"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "page_title"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "user_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "anon_user_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "commenter_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "commenter_link"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "comment_html"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "parent_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "date"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "local_date_string"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "votes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "votes_up"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "votes_down"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "expire_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "reviewed"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "avatar_src"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_spam"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "perm_not_spam"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_links"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_code"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "approved"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "locale"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_banned_user"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_by_admin"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_by_moderator"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_pinned"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_locked"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "flag_count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "display_label"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "badges"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "verified"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "feedback_ids"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_deleted"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_api_count_comments_response_spec.rb b/client/spec/models/moderation_api_count_comments_response_spec.rb new file mode 100644 index 0000000..7239eb6 --- /dev/null +++ b/client/spec/models/moderation_api_count_comments_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationAPICountCommentsResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationAPICountCommentsResponse do + let(:instance) { FastCommentsClient::ModerationAPICountCommentsResponse.new } + + describe 'test an instance of ModerationAPICountCommentsResponse' do + it 'should create an instance of ModerationAPICountCommentsResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationAPICountCommentsResponse) + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_api_get_comment_ids_response_spec.rb b/client/spec/models/moderation_api_get_comment_ids_response_spec.rb new file mode 100644 index 0000000..cb4b943 --- /dev/null +++ b/client/spec/models/moderation_api_get_comment_ids_response_spec.rb @@ -0,0 +1,48 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationAPIGetCommentIdsResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationAPIGetCommentIdsResponse do + let(:instance) { FastCommentsClient::ModerationAPIGetCommentIdsResponse.new } + + describe 'test an instance of ModerationAPIGetCommentIdsResponse' do + it 'should create an instance of ModerationAPIGetCommentIdsResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationAPIGetCommentIdsResponse) + end + end + + describe 'test attribute "ids"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_more"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_api_get_comments_response_spec.rb b/client/spec/models/moderation_api_get_comments_response_spec.rb new file mode 100644 index 0000000..282292b --- /dev/null +++ b/client/spec/models/moderation_api_get_comments_response_spec.rb @@ -0,0 +1,54 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationAPIGetCommentsResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationAPIGetCommentsResponse do + let(:instance) { FastCommentsClient::ModerationAPIGetCommentsResponse.new } + + describe 'test an instance of ModerationAPIGetCommentsResponse' do + it 'should create an instance of ModerationAPIGetCommentsResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationAPIGetCommentsResponse) + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "translations"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "comments"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "moderation_filter"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_api_get_logs_response_spec.rb b/client/spec/models/moderation_api_get_logs_response_spec.rb new file mode 100644 index 0000000..a34d023 --- /dev/null +++ b/client/spec/models/moderation_api_get_logs_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationAPIGetLogsResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationAPIGetLogsResponse do + let(:instance) { FastCommentsClient::ModerationAPIGetLogsResponse.new } + + describe 'test an instance of ModerationAPIGetLogsResponse' do + it 'should create an instance of ModerationAPIGetLogsResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationAPIGetLogsResponse) + end + end + + describe 'test attribute "logs"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_comment_search_response_spec.rb b/client/spec/models/moderation_comment_search_response_spec.rb new file mode 100644 index 0000000..b096054 --- /dev/null +++ b/client/spec/models/moderation_comment_search_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationCommentSearchResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationCommentSearchResponse do + let(:instance) { FastCommentsClient::ModerationCommentSearchResponse.new } + + describe 'test an instance of ModerationCommentSearchResponse' do + it 'should create an instance of ModerationCommentSearchResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationCommentSearchResponse) + end + end + + describe 'test attribute "comment_count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_export_response_spec.rb b/client/spec/models/moderation_export_response_spec.rb new file mode 100644 index 0000000..5322f4c --- /dev/null +++ b/client/spec/models/moderation_export_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationExportResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationExportResponse do + let(:instance) { FastCommentsClient::ModerationExportResponse.new } + + describe 'test an instance of ModerationExportResponse' do + it 'should create an instance of ModerationExportResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationExportResponse) + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "batch_job_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_export_status_response_spec.rb b/client/spec/models/moderation_export_status_response_spec.rb new file mode 100644 index 0000000..707118e --- /dev/null +++ b/client/spec/models/moderation_export_status_response_spec.rb @@ -0,0 +1,54 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationExportStatusResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationExportStatusResponse do + let(:instance) { FastCommentsClient::ModerationExportStatusResponse.new } + + describe 'test an instance of ModerationExportStatusResponse' do + it 'should create an instance of ModerationExportStatusResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationExportStatusResponse) + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "job_status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "record_count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "download_url"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_filter_spec.rb b/client/spec/models/moderation_filter_spec.rb new file mode 100644 index 0000000..1669eeb --- /dev/null +++ b/client/spec/models/moderation_filter_spec.rb @@ -0,0 +1,102 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationFilter +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationFilter do + let(:instance) { FastCommentsClient::ModerationFilter.new } + + describe 'test an instance of ModerationFilter' do + it 'should create an instance of ModerationFilter' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationFilter) + end + end + + describe 'test attribute "reviewed"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "approved"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_spam"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_banned_user"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_locked"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "flag_count_gt"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "user_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "url_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "domain"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "moderation_group_ids"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "comment_text_search"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exact_comment_text"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_page_search_projected_spec.rb b/client/spec/models/moderation_page_search_projected_spec.rb new file mode 100644 index 0000000..1faeac0 --- /dev/null +++ b/client/spec/models/moderation_page_search_projected_spec.rb @@ -0,0 +1,54 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationPageSearchProjected +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationPageSearchProjected do + let(:instance) { FastCommentsClient::ModerationPageSearchProjected.new } + + describe 'test an instance of ModerationPageSearchProjected' do + it 'should create an instance of ModerationPageSearchProjected' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationPageSearchProjected) + end + end + + describe 'test attribute "url_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "url"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "title"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "comment_count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_page_search_response_spec.rb b/client/spec/models/moderation_page_search_response_spec.rb new file mode 100644 index 0000000..449f861 --- /dev/null +++ b/client/spec/models/moderation_page_search_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationPageSearchResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationPageSearchResponse do + let(:instance) { FastCommentsClient::ModerationPageSearchResponse.new } + + describe 'test an instance of ModerationPageSearchResponse' do + it 'should create an instance of ModerationPageSearchResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationPageSearchResponse) + end + end + + describe 'test attribute "pages"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_site_search_projected_spec.rb b/client/spec/models/moderation_site_search_projected_spec.rb new file mode 100644 index 0000000..d197af7 --- /dev/null +++ b/client/spec/models/moderation_site_search_projected_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationSiteSearchProjected +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationSiteSearchProjected do + let(:instance) { FastCommentsClient::ModerationSiteSearchProjected.new } + + describe 'test an instance of ModerationSiteSearchProjected' do + it 'should create an instance of ModerationSiteSearchProjected' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationSiteSearchProjected) + end + end + + describe 'test attribute "domain"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "logo_src100px"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_site_search_response_spec.rb b/client/spec/models/moderation_site_search_response_spec.rb new file mode 100644 index 0000000..6c7cc06 --- /dev/null +++ b/client/spec/models/moderation_site_search_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationSiteSearchResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationSiteSearchResponse do + let(:instance) { FastCommentsClient::ModerationSiteSearchResponse.new } + + describe 'test an instance of ModerationSiteSearchResponse' do + it 'should create an instance of ModerationSiteSearchResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationSiteSearchResponse) + end + end + + describe 'test attribute "sites"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_suggest_response_spec.rb b/client/spec/models/moderation_suggest_response_spec.rb new file mode 100644 index 0000000..0659a03 --- /dev/null +++ b/client/spec/models/moderation_suggest_response_spec.rb @@ -0,0 +1,54 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationSuggestResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationSuggestResponse do + let(:instance) { FastCommentsClient::ModerationSuggestResponse.new } + + describe 'test an instance of ModerationSuggestResponse' do + it 'should create an instance of ModerationSuggestResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationSuggestResponse) + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "pages"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "users"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_user_search_projected_spec.rb b/client/spec/models/moderation_user_search_projected_spec.rb new file mode 100644 index 0000000..d81cbf7 --- /dev/null +++ b/client/spec/models/moderation_user_search_projected_spec.rb @@ -0,0 +1,54 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationUserSearchProjected +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationUserSearchProjected do + let(:instance) { FastCommentsClient::ModerationUserSearchProjected.new } + + describe 'test an instance of ModerationUserSearchProjected' do + it 'should create an instance of ModerationUserSearchProjected' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationUserSearchProjected) + end + end + + describe 'test attribute "_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "username"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "display_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "avatar_src"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderation_user_search_response_spec.rb b/client/spec/models/moderation_user_search_response_spec.rb new file mode 100644 index 0000000..56b3df4 --- /dev/null +++ b/client/spec/models/moderation_user_search_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::ModerationUserSearchResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::ModerationUserSearchResponse do + let(:instance) { FastCommentsClient::ModerationUserSearchResponse.new } + + describe 'test an instance of ModerationUserSearchResponse' do + it 'should create an instance of ModerationUserSearchResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::ModerationUserSearchResponse) + end + end + + describe 'test attribute "users"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/moderator_spec.rb b/client/spec/models/moderator_spec.rb index 121d15b..fbfe703 100644 --- a/client/spec/models/moderator_spec.rb +++ b/client/spec/models/moderator_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::Moderator do - #let(:instance) { FastCommentsClient::Moderator.new } + let(:instance) { FastCommentsClient::Moderator.new } describe 'test an instance of Moderator' do it 'should create an instance of Moderator' do diff --git a/client/spec/models/notification_and_count_spec.rb b/client/spec/models/notification_and_count_spec.rb index 129339e..fe2da82 100644 --- a/client/spec/models/notification_and_count_spec.rb +++ b/client/spec/models/notification_and_count_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::NotificationAndCount do - #let(:instance) { FastCommentsClient::NotificationAndCount.new } + let(:instance) { FastCommentsClient::NotificationAndCount.new } describe 'test an instance of NotificationAndCount' do it 'should create an instance of NotificationAndCount' do diff --git a/client/spec/models/notification_object_type_spec.rb b/client/spec/models/notification_object_type_spec.rb index c332335..b701589 100644 --- a/client/spec/models/notification_object_type_spec.rb +++ b/client/spec/models/notification_object_type_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::NotificationObjectType do - #let(:instance) { FastCommentsClient::NotificationObjectType.new } + let(:instance) { FastCommentsClient::NotificationObjectType.new } describe 'test an instance of NotificationObjectType' do it 'should create an instance of NotificationObjectType' do diff --git a/client/spec/models/notification_type_spec.rb b/client/spec/models/notification_type_spec.rb index ba32510..6c40678 100644 --- a/client/spec/models/notification_type_spec.rb +++ b/client/spec/models/notification_type_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::NotificationType do - #let(:instance) { FastCommentsClient::NotificationType.new } + let(:instance) { FastCommentsClient::NotificationType.new } describe 'test an instance of NotificationType' do it 'should create an instance of NotificationType' do diff --git a/client/spec/models/page_user_entry_spec.rb b/client/spec/models/page_user_entry_spec.rb new file mode 100644 index 0000000..358518d --- /dev/null +++ b/client/spec/models/page_user_entry_spec.rb @@ -0,0 +1,54 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::PageUserEntry +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::PageUserEntry do + let(:instance) { FastCommentsClient::PageUserEntry.new } + + describe 'test an instance of PageUserEntry' do + it 'should create an instance of PageUserEntry' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::PageUserEntry) + end + end + + describe 'test attribute "is_private"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "avatar_src"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "display_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/page_users_info_response_spec.rb b/client/spec/models/page_users_info_response_spec.rb new file mode 100644 index 0000000..0534c8f --- /dev/null +++ b/client/spec/models/page_users_info_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::PageUsersInfoResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::PageUsersInfoResponse do + let(:instance) { FastCommentsClient::PageUsersInfoResponse.new } + + describe 'test an instance of PageUsersInfoResponse' do + it 'should create an instance of PageUsersInfoResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::PageUsersInfoResponse) + end + end + + describe 'test attribute "users"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/page_users_offline_response_spec.rb b/client/spec/models/page_users_offline_response_spec.rb new file mode 100644 index 0000000..dd4f6ce --- /dev/null +++ b/client/spec/models/page_users_offline_response_spec.rb @@ -0,0 +1,54 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::PageUsersOfflineResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::PageUsersOfflineResponse do + let(:instance) { FastCommentsClient::PageUsersOfflineResponse.new } + + describe 'test an instance of PageUsersOfflineResponse' do + it 'should create an instance of PageUsersOfflineResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::PageUsersOfflineResponse) + end + end + + describe 'test attribute "next_after_user_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "next_after_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "users"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/page_users_online_response_spec.rb b/client/spec/models/page_users_online_response_spec.rb new file mode 100644 index 0000000..effb885 --- /dev/null +++ b/client/spec/models/page_users_online_response_spec.rb @@ -0,0 +1,66 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::PageUsersOnlineResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::PageUsersOnlineResponse do + let(:instance) { FastCommentsClient::PageUsersOnlineResponse.new } + + describe 'test an instance of PageUsersOnlineResponse' do + it 'should create an instance of PageUsersOnlineResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::PageUsersOnlineResponse) + end + end + + describe 'test attribute "next_after_user_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "next_after_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "total_count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "anon_count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "users"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/pages_sort_by_spec.rb b/client/spec/models/pages_sort_by_spec.rb new file mode 100644 index 0000000..dca4fce --- /dev/null +++ b/client/spec/models/pages_sort_by_spec.rb @@ -0,0 +1,30 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::PagesSortBy +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::PagesSortBy do + let(:instance) { FastCommentsClient::PagesSortBy.new } + + describe 'test an instance of PagesSortBy' do + it 'should create an instance of PagesSortBy' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::PagesSortBy) + end + end + +end diff --git a/client/spec/models/patch_domain_config_params_spec.rb b/client/spec/models/patch_domain_config_params_spec.rb index 9634f95..5f145a9 100644 --- a/client/spec/models/patch_domain_config_params_spec.rb +++ b/client/spec/models/patch_domain_config_params_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::PatchDomainConfigParams do - #let(:instance) { FastCommentsClient::PatchDomainConfigParams.new } + let(:instance) { FastCommentsClient::PatchDomainConfigParams.new } describe 'test an instance of PatchDomainConfigParams' do it 'should create an instance of PatchDomainConfigParams' do diff --git a/client/spec/models/patch_domain_config_response_spec.rb b/client/spec/models/patch_domain_config_response_spec.rb new file mode 100644 index 0000000..8f442bb --- /dev/null +++ b/client/spec/models/patch_domain_config_response_spec.rb @@ -0,0 +1,21 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::PatchDomainConfigResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::PatchDomainConfigResponse do +end diff --git a/client/spec/models/patch_hash_tag200_response_spec.rb b/client/spec/models/patch_hash_tag200_response_spec.rb deleted file mode 100644 index d2b3bd6..0000000 --- a/client/spec/models/patch_hash_tag200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::PatchHashTag200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::PatchHashTag200Response do -end diff --git a/client/spec/models/patch_page_api_response_spec.rb b/client/spec/models/patch_page_api_response_spec.rb index a53ad1b..f2ce6bf 100644 --- a/client/spec/models/patch_page_api_response_spec.rb +++ b/client/spec/models/patch_page_api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::PatchPageAPIResponse do - #let(:instance) { FastCommentsClient::PatchPageAPIResponse.new } + let(:instance) { FastCommentsClient::PatchPageAPIResponse.new } describe 'test an instance of PatchPageAPIResponse' do it 'should create an instance of PatchPageAPIResponse' do diff --git a/client/spec/models/patch_sso_user_api_response_spec.rb b/client/spec/models/patch_sso_user_api_response_spec.rb index 038ebb3..b775c54 100644 --- a/client/spec/models/patch_sso_user_api_response_spec.rb +++ b/client/spec/models/patch_sso_user_api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::PatchSSOUserAPIResponse do - #let(:instance) { FastCommentsClient::PatchSSOUserAPIResponse.new } + let(:instance) { FastCommentsClient::PatchSSOUserAPIResponse.new } describe 'test an instance of PatchSSOUserAPIResponse' do it 'should create an instance of PatchSSOUserAPIResponse' do diff --git a/client/spec/models/pending_comment_to_sync_outbound_spec.rb b/client/spec/models/pending_comment_to_sync_outbound_spec.rb index 2b20ac8..4189751 100644 --- a/client/spec/models/pending_comment_to_sync_outbound_spec.rb +++ b/client/spec/models/pending_comment_to_sync_outbound_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::PendingCommentToSyncOutbound do - #let(:instance) { FastCommentsClient::PendingCommentToSyncOutbound.new } + let(:instance) { FastCommentsClient::PendingCommentToSyncOutbound.new } describe 'test an instance of PendingCommentToSyncOutbound' do it 'should create an instance of PendingCommentToSyncOutbound' do diff --git a/client/spec/models/pin_comment200_response_spec.rb b/client/spec/models/pin_comment200_response_spec.rb deleted file mode 100644 index afe671b..0000000 --- a/client/spec/models/pin_comment200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::PinComment200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::PinComment200Response do -end diff --git a/client/spec/models/post_remove_comment_response_spec.rb b/client/spec/models/post_remove_comment_response_spec.rb new file mode 100644 index 0000000..77a0b22 --- /dev/null +++ b/client/spec/models/post_remove_comment_response_spec.rb @@ -0,0 +1,21 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::PostRemoveCommentResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::PostRemoveCommentResponse do +end diff --git a/client/spec/models/pre_ban_summary_spec.rb b/client/spec/models/pre_ban_summary_spec.rb new file mode 100644 index 0000000..152e19f --- /dev/null +++ b/client/spec/models/pre_ban_summary_spec.rb @@ -0,0 +1,48 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::PreBanSummary +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::PreBanSummary do + let(:instance) { FastCommentsClient::PreBanSummary.new } + + describe 'test an instance of PreBanSummary' do + it 'should create an instance of PreBanSummary' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::PreBanSummary) + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "usernames"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/pub_sub_comment_base_spec.rb b/client/spec/models/pub_sub_comment_base_spec.rb index 166ad8a..05997f3 100644 --- a/client/spec/models/pub_sub_comment_base_spec.rb +++ b/client/spec/models/pub_sub_comment_base_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::PubSubCommentBase do - #let(:instance) { FastCommentsClient::PubSubCommentBase.new } + let(:instance) { FastCommentsClient::PubSubCommentBase.new } describe 'test an instance of PubSubCommentBase' do it 'should create an instance of PubSubCommentBase' do diff --git a/client/spec/models/pub_sub_comment_spec.rb b/client/spec/models/pub_sub_comment_spec.rb index 329f98a..389d56a 100644 --- a/client/spec/models/pub_sub_comment_spec.rb +++ b/client/spec/models/pub_sub_comment_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::PubSubComment do - #let(:instance) { FastCommentsClient::PubSubComment.new } + let(:instance) { FastCommentsClient::PubSubComment.new } describe 'test an instance of PubSubComment' do it 'should create an instance of PubSubComment' do diff --git a/client/spec/models/pub_sub_vote_spec.rb b/client/spec/models/pub_sub_vote_spec.rb index c423f32..e02fbeb 100644 --- a/client/spec/models/pub_sub_vote_spec.rb +++ b/client/spec/models/pub_sub_vote_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::PubSubVote do - #let(:instance) { FastCommentsClient::PubSubVote.new } + let(:instance) { FastCommentsClient::PubSubVote.new } describe 'test an instance of PubSubVote' do it 'should create an instance of PubSubVote' do diff --git a/client/spec/models/public_api_delete_comment_response_spec.rb b/client/spec/models/public_api_delete_comment_response_spec.rb index e8c4255..6d1f375 100644 --- a/client/spec/models/public_api_delete_comment_response_spec.rb +++ b/client/spec/models/public_api_delete_comment_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::PublicAPIDeleteCommentResponse do - #let(:instance) { FastCommentsClient::PublicAPIDeleteCommentResponse.new } + let(:instance) { FastCommentsClient::PublicAPIDeleteCommentResponse.new } describe 'test an instance of PublicAPIDeleteCommentResponse' do it 'should create an instance of PublicAPIDeleteCommentResponse' do diff --git a/client/spec/models/public_api_get_comment_text_response_spec.rb b/client/spec/models/public_api_get_comment_text_response_spec.rb index f93f83a..357dc62 100644 --- a/client/spec/models/public_api_get_comment_text_response_spec.rb +++ b/client/spec/models/public_api_get_comment_text_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::PublicAPIGetCommentTextResponse do - #let(:instance) { FastCommentsClient::PublicAPIGetCommentTextResponse.new } + let(:instance) { FastCommentsClient::PublicAPIGetCommentTextResponse.new } describe 'test an instance of PublicAPIGetCommentTextResponse' do it 'should create an instance of PublicAPIGetCommentTextResponse' do diff --git a/client/spec/models/public_api_set_comment_text_response_spec.rb b/client/spec/models/public_api_set_comment_text_response_spec.rb index d11dfc1..accbb3b 100644 --- a/client/spec/models/public_api_set_comment_text_response_spec.rb +++ b/client/spec/models/public_api_set_comment_text_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::PublicAPISetCommentTextResponse do - #let(:instance) { FastCommentsClient::PublicAPISetCommentTextResponse.new } + let(:instance) { FastCommentsClient::PublicAPISetCommentTextResponse.new } describe 'test an instance of PublicAPISetCommentTextResponse' do it 'should create an instance of PublicAPISetCommentTextResponse' do diff --git a/client/spec/models/public_block_from_comment_params_spec.rb b/client/spec/models/public_block_from_comment_params_spec.rb index 02f991e..e456875 100644 --- a/client/spec/models/public_block_from_comment_params_spec.rb +++ b/client/spec/models/public_block_from_comment_params_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::PublicBlockFromCommentParams do - #let(:instance) { FastCommentsClient::PublicBlockFromCommentParams.new } + let(:instance) { FastCommentsClient::PublicBlockFromCommentParams.new } describe 'test an instance of PublicBlockFromCommentParams' do it 'should create an instance of PublicBlockFromCommentParams' do diff --git a/client/spec/models/public_comment_base_spec.rb b/client/spec/models/public_comment_base_spec.rb index 8078ce7..5f0065e 100644 --- a/client/spec/models/public_comment_base_spec.rb +++ b/client/spec/models/public_comment_base_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::PublicCommentBase do - #let(:instance) { FastCommentsClient::PublicCommentBase.new } + let(:instance) { FastCommentsClient::PublicCommentBase.new } describe 'test an instance of PublicCommentBase' do it 'should create an instance of PublicCommentBase' do diff --git a/client/spec/models/public_comment_spec.rb b/client/spec/models/public_comment_spec.rb index 107224e..32b2e7f 100644 --- a/client/spec/models/public_comment_spec.rb +++ b/client/spec/models/public_comment_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::PublicComment do - #let(:instance) { FastCommentsClient::PublicComment.new } + let(:instance) { FastCommentsClient::PublicComment.new } describe 'test an instance of PublicComment' do it 'should create an instance of PublicComment' do diff --git a/client/spec/models/public_feed_posts_response_spec.rb b/client/spec/models/public_feed_posts_response_spec.rb index 9c5db00..b18c425 100644 --- a/client/spec/models/public_feed_posts_response_spec.rb +++ b/client/spec/models/public_feed_posts_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::PublicFeedPostsResponse do - #let(:instance) { FastCommentsClient::PublicFeedPostsResponse.new } + let(:instance) { FastCommentsClient::PublicFeedPostsResponse.new } describe 'test an instance of PublicFeedPostsResponse' do it 'should create an instance of PublicFeedPostsResponse' do diff --git a/client/spec/models/public_page_spec.rb b/client/spec/models/public_page_spec.rb new file mode 100644 index 0000000..e7841ed --- /dev/null +++ b/client/spec/models/public_page_spec.rb @@ -0,0 +1,60 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::PublicPage +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::PublicPage do + let(:instance) { FastCommentsClient::PublicPage.new } + + describe 'test an instance of PublicPage' do + it 'should create an instance of PublicPage' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::PublicPage) + end + end + + describe 'test attribute "updated_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "comment_count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "title"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "url"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "url_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/public_vote_spec.rb b/client/spec/models/public_vote_spec.rb index fe64201..3944f91 100644 --- a/client/spec/models/public_vote_spec.rb +++ b/client/spec/models/public_vote_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::PublicVote do - #let(:instance) { FastCommentsClient::PublicVote.new } + let(:instance) { FastCommentsClient::PublicVote.new } describe 'test an instance of PublicVote' do it 'should create an instance of PublicVote' do diff --git a/client/spec/models/put_domain_config_response_spec.rb b/client/spec/models/put_domain_config_response_spec.rb new file mode 100644 index 0000000..685f398 --- /dev/null +++ b/client/spec/models/put_domain_config_response_spec.rb @@ -0,0 +1,21 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::PutDomainConfigResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::PutDomainConfigResponse do +end diff --git a/client/spec/models/put_sso_user_api_response_spec.rb b/client/spec/models/put_sso_user_api_response_spec.rb index 2589005..c5b37e9 100644 --- a/client/spec/models/put_sso_user_api_response_spec.rb +++ b/client/spec/models/put_sso_user_api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::PutSSOUserAPIResponse do - #let(:instance) { FastCommentsClient::PutSSOUserAPIResponse.new } + let(:instance) { FastCommentsClient::PutSSOUserAPIResponse.new } describe 'test an instance of PutSSOUserAPIResponse' do it 'should create an instance of PutSSOUserAPIResponse' do diff --git a/client/spec/models/query_predicate_spec.rb b/client/spec/models/query_predicate_spec.rb index 2a63077..9390167 100644 --- a/client/spec/models/query_predicate_spec.rb +++ b/client/spec/models/query_predicate_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::QueryPredicate do - #let(:instance) { FastCommentsClient::QueryPredicate.new } + let(:instance) { FastCommentsClient::QueryPredicate.new } describe 'test an instance of QueryPredicate' do it 'should create an instance of QueryPredicate' do diff --git a/client/spec/models/query_predicate_value_spec.rb b/client/spec/models/query_predicate_value_spec.rb index fd7c592..3216bf1 100644 --- a/client/spec/models/query_predicate_value_spec.rb +++ b/client/spec/models/query_predicate_value_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/client/spec/models/question_config_custom_options_inner_spec.rb b/client/spec/models/question_config_custom_options_inner_spec.rb index e8e4a56..ab4eff5 100644 --- a/client/spec/models/question_config_custom_options_inner_spec.rb +++ b/client/spec/models/question_config_custom_options_inner_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::QuestionConfigCustomOptionsInner do - #let(:instance) { FastCommentsClient::QuestionConfigCustomOptionsInner.new } + let(:instance) { FastCommentsClient::QuestionConfigCustomOptionsInner.new } describe 'test an instance of QuestionConfigCustomOptionsInner' do it 'should create an instance of QuestionConfigCustomOptionsInner' do diff --git a/client/spec/models/question_config_spec.rb b/client/spec/models/question_config_spec.rb index eba92c2..7d7af22 100644 --- a/client/spec/models/question_config_spec.rb +++ b/client/spec/models/question_config_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::QuestionConfig do - #let(:instance) { FastCommentsClient::QuestionConfig.new } + let(:instance) { FastCommentsClient::QuestionConfig.new } describe 'test an instance of QuestionConfig' do it 'should create an instance of QuestionConfig' do diff --git a/client/spec/models/question_datum_spec.rb b/client/spec/models/question_datum_spec.rb index 0dc0112..893b847 100644 --- a/client/spec/models/question_datum_spec.rb +++ b/client/spec/models/question_datum_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::QuestionDatum do - #let(:instance) { FastCommentsClient::QuestionDatum.new } + let(:instance) { FastCommentsClient::QuestionDatum.new } describe 'test an instance of QuestionDatum' do it 'should create an instance of QuestionDatum' do diff --git a/client/spec/models/question_rendering_type_spec.rb b/client/spec/models/question_rendering_type_spec.rb index eb6b7a8..dfb08cb 100644 --- a/client/spec/models/question_rendering_type_spec.rb +++ b/client/spec/models/question_rendering_type_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::QuestionRenderingType do - #let(:instance) { FastCommentsClient::QuestionRenderingType.new } + let(:instance) { FastCommentsClient::QuestionRenderingType.new } describe 'test an instance of QuestionRenderingType' do it 'should create an instance of QuestionRenderingType' do diff --git a/client/spec/models/question_result_aggregation_overall_spec.rb b/client/spec/models/question_result_aggregation_overall_spec.rb index 8fea0ac..0670df6 100644 --- a/client/spec/models/question_result_aggregation_overall_spec.rb +++ b/client/spec/models/question_result_aggregation_overall_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::QuestionResultAggregationOverall do - #let(:instance) { FastCommentsClient::QuestionResultAggregationOverall.new } + let(:instance) { FastCommentsClient::QuestionResultAggregationOverall.new } describe 'test an instance of QuestionResultAggregationOverall' do it 'should create an instance of QuestionResultAggregationOverall' do diff --git a/client/spec/models/question_result_spec.rb b/client/spec/models/question_result_spec.rb index 38709aa..8d39c1d 100644 --- a/client/spec/models/question_result_spec.rb +++ b/client/spec/models/question_result_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::QuestionResult do - #let(:instance) { FastCommentsClient::QuestionResult.new } + let(:instance) { FastCommentsClient::QuestionResult.new } describe 'test an instance of QuestionResult' do it 'should create an instance of QuestionResult' do diff --git a/client/spec/models/question_sub_question_visibility_spec.rb b/client/spec/models/question_sub_question_visibility_spec.rb index 6577f0f..d8148e0 100644 --- a/client/spec/models/question_sub_question_visibility_spec.rb +++ b/client/spec/models/question_sub_question_visibility_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::QuestionSubQuestionVisibility do - #let(:instance) { FastCommentsClient::QuestionSubQuestionVisibility.new } + let(:instance) { FastCommentsClient::QuestionSubQuestionVisibility.new } describe 'test an instance of QuestionSubQuestionVisibility' do it 'should create an instance of QuestionSubQuestionVisibility' do diff --git a/client/spec/models/question_when_save_spec.rb b/client/spec/models/question_when_save_spec.rb index daf1425..5e385ef 100644 --- a/client/spec/models/question_when_save_spec.rb +++ b/client/spec/models/question_when_save_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::QuestionWhenSave do - #let(:instance) { FastCommentsClient::QuestionWhenSave.new } + let(:instance) { FastCommentsClient::QuestionWhenSave.new } describe 'test an instance of QuestionWhenSave' do it 'should create an instance of QuestionWhenSave' do diff --git a/client/spec/models/react_body_params_spec.rb b/client/spec/models/react_body_params_spec.rb index b0335ad..f742982 100644 --- a/client/spec/models/react_body_params_spec.rb +++ b/client/spec/models/react_body_params_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::ReactBodyParams do - #let(:instance) { FastCommentsClient::ReactBodyParams.new } + let(:instance) { FastCommentsClient::ReactBodyParams.new } describe 'test an instance of ReactBodyParams' do it 'should create an instance of ReactBodyParams' do diff --git a/client/spec/models/react_feed_post_public200_response_spec.rb b/client/spec/models/react_feed_post_public200_response_spec.rb deleted file mode 100644 index 64afb2b..0000000 --- a/client/spec/models/react_feed_post_public200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::ReactFeedPostPublic200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::ReactFeedPostPublic200Response do -end diff --git a/client/spec/models/react_feed_post_response_spec.rb b/client/spec/models/react_feed_post_response_spec.rb index fa46a7f..e045a05 100644 --- a/client/spec/models/react_feed_post_response_spec.rb +++ b/client/spec/models/react_feed_post_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::ReactFeedPostResponse do - #let(:instance) { FastCommentsClient::ReactFeedPostResponse.new } + let(:instance) { FastCommentsClient::ReactFeedPostResponse.new } describe 'test an instance of ReactFeedPostResponse' do it 'should create an instance of ReactFeedPostResponse' do diff --git a/client/spec/models/record_string_before_string_or_null_after_string_or_null_value_spec.rb b/client/spec/models/record_string_before_string_or_null_after_string_or_null_value_spec.rb index 7e41c63..54fe5fa 100644 --- a/client/spec/models/record_string_before_string_or_null_after_string_or_null_value_spec.rb +++ b/client/spec/models/record_string_before_string_or_null_after_string_or_null_value_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::RecordStringBeforeStringOrNullAfterStringOrNullValue do - #let(:instance) { FastCommentsClient::RecordStringBeforeStringOrNullAfterStringOrNullValue.new } + let(:instance) { FastCommentsClient::RecordStringBeforeStringOrNullAfterStringOrNullValue.new } describe 'test an instance of RecordStringBeforeStringOrNullAfterStringOrNullValue' do it 'should create an instance of RecordStringBeforeStringOrNullAfterStringOrNullValue' do diff --git a/client/spec/models/record_string_string_or_number_value_spec.rb b/client/spec/models/record_string_string_or_number_value_spec.rb deleted file mode 100644 index f18aa5d..0000000 --- a/client/spec/models/record_string_string_or_number_value_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::RecordStringStringOrNumberValue -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::RecordStringStringOrNumberValue do -end diff --git a/client/spec/models/remove_comment_action_response_spec.rb b/client/spec/models/remove_comment_action_response_spec.rb new file mode 100644 index 0000000..fc03d6e --- /dev/null +++ b/client/spec/models/remove_comment_action_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::RemoveCommentActionResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::RemoveCommentActionResponse do + let(:instance) { FastCommentsClient::RemoveCommentActionResponse.new } + + describe 'test an instance of RemoveCommentActionResponse' do + it 'should create an instance of RemoveCommentActionResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::RemoveCommentActionResponse) + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "action"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/remove_user_badge_response_spec.rb b/client/spec/models/remove_user_badge_response_spec.rb new file mode 100644 index 0000000..4cad561 --- /dev/null +++ b/client/spec/models/remove_user_badge_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::RemoveUserBadgeResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::RemoveUserBadgeResponse do + let(:instance) { FastCommentsClient::RemoveUserBadgeResponse.new } + + describe 'test an instance of RemoveUserBadgeResponse' do + it 'should create an instance of RemoveUserBadgeResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::RemoveUserBadgeResponse) + end + end + + describe 'test attribute "badges"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/render_email_template200_response_spec.rb b/client/spec/models/render_email_template200_response_spec.rb deleted file mode 100644 index 8eb97f0..0000000 --- a/client/spec/models/render_email_template200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::RenderEmailTemplate200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::RenderEmailTemplate200Response do -end diff --git a/client/spec/models/render_email_template_body_spec.rb b/client/spec/models/render_email_template_body_spec.rb index 9399449..305cebc 100644 --- a/client/spec/models/render_email_template_body_spec.rb +++ b/client/spec/models/render_email_template_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::RenderEmailTemplateBody do - #let(:instance) { FastCommentsClient::RenderEmailTemplateBody.new } + let(:instance) { FastCommentsClient::RenderEmailTemplateBody.new } describe 'test an instance of RenderEmailTemplateBody' do it 'should create an instance of RenderEmailTemplateBody' do diff --git a/client/spec/models/render_email_template_response_spec.rb b/client/spec/models/render_email_template_response_spec.rb index 9af0ccb..9cacd5b 100644 --- a/client/spec/models/render_email_template_response_spec.rb +++ b/client/spec/models/render_email_template_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::RenderEmailTemplateResponse do - #let(:instance) { FastCommentsClient::RenderEmailTemplateResponse.new } + let(:instance) { FastCommentsClient::RenderEmailTemplateResponse.new } describe 'test an instance of RenderEmailTemplateResponse' do it 'should create an instance of RenderEmailTemplateResponse' do diff --git a/client/spec/models/renderable_user_notification_spec.rb b/client/spec/models/renderable_user_notification_spec.rb index f510f86..c48b26b 100644 --- a/client/spec/models/renderable_user_notification_spec.rb +++ b/client/spec/models/renderable_user_notification_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::RenderableUserNotification do - #let(:instance) { FastCommentsClient::RenderableUserNotification.new } + let(:instance) { FastCommentsClient::RenderableUserNotification.new } describe 'test an instance of RenderableUserNotification' do it 'should create an instance of RenderableUserNotification' do diff --git a/client/spec/models/repeat_comment_check_ignored_reason_spec.rb b/client/spec/models/repeat_comment_check_ignored_reason_spec.rb index 1429012..cdfeaab 100644 --- a/client/spec/models/repeat_comment_check_ignored_reason_spec.rb +++ b/client/spec/models/repeat_comment_check_ignored_reason_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::RepeatCommentCheckIgnoredReason do - #let(:instance) { FastCommentsClient::RepeatCommentCheckIgnoredReason.new } + let(:instance) { FastCommentsClient::RepeatCommentCheckIgnoredReason.new } describe 'test an instance of RepeatCommentCheckIgnoredReason' do it 'should create an instance of RepeatCommentCheckIgnoredReason' do diff --git a/client/spec/models/repeat_comment_handling_action_spec.rb b/client/spec/models/repeat_comment_handling_action_spec.rb index a03eb42..cd5047c 100644 --- a/client/spec/models/repeat_comment_handling_action_spec.rb +++ b/client/spec/models/repeat_comment_handling_action_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::RepeatCommentHandlingAction do - #let(:instance) { FastCommentsClient::RepeatCommentHandlingAction.new } + let(:instance) { FastCommentsClient::RepeatCommentHandlingAction.new } describe 'test an instance of RepeatCommentHandlingAction' do it 'should create an instance of RepeatCommentHandlingAction' do diff --git a/client/spec/models/replace_tenant_package_body_spec.rb b/client/spec/models/replace_tenant_package_body_spec.rb index bd201e5..890a6a7 100644 --- a/client/spec/models/replace_tenant_package_body_spec.rb +++ b/client/spec/models/replace_tenant_package_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::ReplaceTenantPackageBody do - #let(:instance) { FastCommentsClient::ReplaceTenantPackageBody.new } + let(:instance) { FastCommentsClient::ReplaceTenantPackageBody.new } describe 'test an instance of ReplaceTenantPackageBody' do it 'should create an instance of ReplaceTenantPackageBody' do diff --git a/client/spec/models/replace_tenant_user_body_spec.rb b/client/spec/models/replace_tenant_user_body_spec.rb index 65a6b3e..600ff0e 100644 --- a/client/spec/models/replace_tenant_user_body_spec.rb +++ b/client/spec/models/replace_tenant_user_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::ReplaceTenantUserBody do - #let(:instance) { FastCommentsClient::ReplaceTenantUserBody.new } + let(:instance) { FastCommentsClient::ReplaceTenantUserBody.new } describe 'test an instance of ReplaceTenantUserBody' do it 'should create an instance of ReplaceTenantUserBody' do diff --git a/client/spec/models/reset_user_notifications200_response_spec.rb b/client/spec/models/reset_user_notifications200_response_spec.rb deleted file mode 100644 index 5eb4c4a..0000000 --- a/client/spec/models/reset_user_notifications200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::ResetUserNotifications200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::ResetUserNotifications200Response do -end diff --git a/client/spec/models/reset_user_notifications_response_spec.rb b/client/spec/models/reset_user_notifications_response_spec.rb index 068f917..23a24ed 100644 --- a/client/spec/models/reset_user_notifications_response_spec.rb +++ b/client/spec/models/reset_user_notifications_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::ResetUserNotificationsResponse do - #let(:instance) { FastCommentsClient::ResetUserNotificationsResponse.new } + let(:instance) { FastCommentsClient::ResetUserNotificationsResponse.new } describe 'test an instance of ResetUserNotificationsResponse' do it 'should create an instance of ResetUserNotificationsResponse' do diff --git a/client/spec/models/save_comment200_response_spec.rb b/client/spec/models/save_comment200_response_spec.rb deleted file mode 100644 index f55ef63..0000000 --- a/client/spec/models/save_comment200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::SaveComment200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::SaveComment200Response do -end diff --git a/client/spec/models/save_comment_response_optimized_spec.rb b/client/spec/models/save_comment_response_optimized_spec.rb index 74db53a..6791334 100644 --- a/client/spec/models/save_comment_response_optimized_spec.rb +++ b/client/spec/models/save_comment_response_optimized_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::SaveCommentResponseOptimized do - #let(:instance) { FastCommentsClient::SaveCommentResponseOptimized.new } + let(:instance) { FastCommentsClient::SaveCommentResponseOptimized.new } describe 'test an instance of SaveCommentResponseOptimized' do it 'should create an instance of SaveCommentResponseOptimized' do diff --git a/client/spec/models/save_comments_bulk_response_spec.rb b/client/spec/models/save_comments_bulk_response_spec.rb new file mode 100644 index 0000000..66a4fab --- /dev/null +++ b/client/spec/models/save_comments_bulk_response_spec.rb @@ -0,0 +1,21 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::SaveCommentsBulkResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::SaveCommentsBulkResponse do +end diff --git a/client/spec/models/save_comments_response_with_presence_spec.rb b/client/spec/models/save_comments_response_with_presence_spec.rb index caa9380..cbe1ed3 100644 --- a/client/spec/models/save_comments_response_with_presence_spec.rb +++ b/client/spec/models/save_comments_response_with_presence_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::SaveCommentsResponseWithPresence do - #let(:instance) { FastCommentsClient::SaveCommentsResponseWithPresence.new } + let(:instance) { FastCommentsClient::SaveCommentsResponseWithPresence.new } describe 'test an instance of SaveCommentsResponseWithPresence' do it 'should create an instance of SaveCommentsResponseWithPresence' do diff --git a/client/spec/models/search_users200_response_spec.rb b/client/spec/models/search_users200_response_spec.rb deleted file mode 100644 index a107729..0000000 --- a/client/spec/models/search_users200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::SearchUsers200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::SearchUsers200Response do -end diff --git a/client/spec/models/search_users_response_spec.rb b/client/spec/models/search_users_response_spec.rb index 3c7fef4..f366646 100644 --- a/client/spec/models/search_users_response_spec.rb +++ b/client/spec/models/search_users_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::SearchUsersResponse do - #let(:instance) { FastCommentsClient::SearchUsersResponse.new } + let(:instance) { FastCommentsClient::SearchUsersResponse.new } describe 'test an instance of SearchUsersResponse' do it 'should create an instance of SearchUsersResponse' do diff --git a/client/spec/models/search_users_result_spec.rb b/client/spec/models/search_users_result_spec.rb new file mode 100644 index 0000000..39a5394 --- /dev/null +++ b/client/spec/models/search_users_result_spec.rb @@ -0,0 +1,21 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::SearchUsersResult +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::SearchUsersResult do +end diff --git a/client/spec/models/search_users_sectioned_response_spec.rb b/client/spec/models/search_users_sectioned_response_spec.rb index 590cf9b..c6f05e5 100644 --- a/client/spec/models/search_users_sectioned_response_spec.rb +++ b/client/spec/models/search_users_sectioned_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::SearchUsersSectionedResponse do - #let(:instance) { FastCommentsClient::SearchUsersSectionedResponse.new } + let(:instance) { FastCommentsClient::SearchUsersSectionedResponse.new } describe 'test an instance of SearchUsersSectionedResponse' do it 'should create an instance of SearchUsersSectionedResponse' do diff --git a/client/spec/models/set_comment_approved_response_spec.rb b/client/spec/models/set_comment_approved_response_spec.rb new file mode 100644 index 0000000..e5ac387 --- /dev/null +++ b/client/spec/models/set_comment_approved_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::SetCommentApprovedResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::SetCommentApprovedResponse do + let(:instance) { FastCommentsClient::SetCommentApprovedResponse.new } + + describe 'test an instance of SetCommentApprovedResponse' do + it 'should create an instance of SetCommentApprovedResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::SetCommentApprovedResponse) + end + end + + describe 'test attribute "did_reset_flagged_count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/set_comment_text200_response_spec.rb b/client/spec/models/set_comment_text200_response_spec.rb deleted file mode 100644 index 9b3c962..0000000 --- a/client/spec/models/set_comment_text200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::SetCommentText200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::SetCommentText200Response do -end diff --git a/client/spec/models/set_comment_text_params_spec.rb b/client/spec/models/set_comment_text_params_spec.rb new file mode 100644 index 0000000..c50df14 --- /dev/null +++ b/client/spec/models/set_comment_text_params_spec.rb @@ -0,0 +1,36 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::SetCommentTextParams +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::SetCommentTextParams do + let(:instance) { FastCommentsClient::SetCommentTextParams.new } + + describe 'test an instance of SetCommentTextParams' do + it 'should create an instance of SetCommentTextParams' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::SetCommentTextParams) + end + end + + describe 'test attribute "comment"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/set_comment_text_response_spec.rb b/client/spec/models/set_comment_text_response_spec.rb new file mode 100644 index 0000000..f6dd6ed --- /dev/null +++ b/client/spec/models/set_comment_text_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::SetCommentTextResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::SetCommentTextResponse do + let(:instance) { FastCommentsClient::SetCommentTextResponse.new } + + describe 'test an instance of SetCommentTextResponse' do + it 'should create an instance of SetCommentTextResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::SetCommentTextResponse) + end + end + + describe 'test attribute "new_comment_text_html"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/set_comment_text_result_spec.rb b/client/spec/models/set_comment_text_result_spec.rb index 7fafb10..c3d5ae4 100644 --- a/client/spec/models/set_comment_text_result_spec.rb +++ b/client/spec/models/set_comment_text_result_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::SetCommentTextResult do - #let(:instance) { FastCommentsClient::SetCommentTextResult.new } + let(:instance) { FastCommentsClient::SetCommentTextResult.new } describe 'test an instance of SetCommentTextResult' do it 'should create an instance of SetCommentTextResult' do diff --git a/client/spec/models/set_user_trust_factor_response_spec.rb b/client/spec/models/set_user_trust_factor_response_spec.rb new file mode 100644 index 0000000..c070039 --- /dev/null +++ b/client/spec/models/set_user_trust_factor_response_spec.rb @@ -0,0 +1,42 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::SetUserTrustFactorResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::SetUserTrustFactorResponse do + let(:instance) { FastCommentsClient::SetUserTrustFactorResponse.new } + + describe 'test an instance of SetUserTrustFactorResponse' do + it 'should create an instance of SetUserTrustFactorResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::SetUserTrustFactorResponse) + end + end + + describe 'test attribute "previous_manual_trust_factor"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/size_preset_spec.rb b/client/spec/models/size_preset_spec.rb index ecaa380..34bbbda 100644 --- a/client/spec/models/size_preset_spec.rb +++ b/client/spec/models/size_preset_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::SizePreset do - #let(:instance) { FastCommentsClient::SizePreset.new } + let(:instance) { FastCommentsClient::SizePreset.new } describe 'test an instance of SizePreset' do it 'should create an instance of SizePreset' do diff --git a/client/spec/models/sort_directions_spec.rb b/client/spec/models/sort_directions_spec.rb index 3426335..563094d 100644 --- a/client/spec/models/sort_directions_spec.rb +++ b/client/spec/models/sort_directions_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::SortDirections do - #let(:instance) { FastCommentsClient::SortDirections.new } + let(:instance) { FastCommentsClient::SortDirections.new } describe 'test an instance of SortDirections' do it 'should create an instance of SortDirections' do diff --git a/client/spec/models/sortdir_spec.rb b/client/spec/models/sortdir_spec.rb index ee90a79..4b48152 100644 --- a/client/spec/models/sortdir_spec.rb +++ b/client/spec/models/sortdir_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::SORTDIR do - #let(:instance) { FastCommentsClient::SORTDIR.new } + let(:instance) { FastCommentsClient::SORTDIR.new } describe 'test an instance of SORTDIR' do it 'should create an instance of SORTDIR' do diff --git a/client/spec/models/spam_rule_spec.rb b/client/spec/models/spam_rule_spec.rb index d130533..ee98bc0 100644 --- a/client/spec/models/spam_rule_spec.rb +++ b/client/spec/models/spam_rule_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::SpamRule do - #let(:instance) { FastCommentsClient::SpamRule.new } + let(:instance) { FastCommentsClient::SpamRule.new } describe 'test an instance of SpamRule' do it 'should create an instance of SpamRule' do diff --git a/client/spec/models/sso_security_level_spec.rb b/client/spec/models/sso_security_level_spec.rb index 18f01fd..6c63521 100644 --- a/client/spec/models/sso_security_level_spec.rb +++ b/client/spec/models/sso_security_level_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::SSOSecurityLevel do - #let(:instance) { FastCommentsClient::SSOSecurityLevel.new } + let(:instance) { FastCommentsClient::SSOSecurityLevel.new } describe 'test an instance of SSOSecurityLevel' do it 'should create an instance of SSOSecurityLevel' do diff --git a/client/spec/models/tenant_badge_spec.rb b/client/spec/models/tenant_badge_spec.rb new file mode 100644 index 0000000..0bfc007 --- /dev/null +++ b/client/spec/models/tenant_badge_spec.rb @@ -0,0 +1,156 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::TenantBadge +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::TenantBadge do + let(:instance) { FastCommentsClient::TenantBadge.new } + + describe 'test an instance of TenantBadge' do + it 'should create an instance of TenantBadge' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::TenantBadge) + end + end + + describe 'test attribute "_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tenant_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "created_by_user_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "enabled"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "url_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "threshold"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "uses"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "display_label"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "display_src"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "background_color"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "border_color"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "text_color"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "css_class"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "veteran_user_threshold_millis"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_awaiting_reprocess"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_awaiting_deletion"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "replaces_badge_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/client/spec/models/tenant_hash_tag_spec.rb b/client/spec/models/tenant_hash_tag_spec.rb index 29dfd76..7dba7c6 100644 --- a/client/spec/models/tenant_hash_tag_spec.rb +++ b/client/spec/models/tenant_hash_tag_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::TenantHashTag do - #let(:instance) { FastCommentsClient::TenantHashTag.new } + let(:instance) { FastCommentsClient::TenantHashTag.new } describe 'test an instance of TenantHashTag' do it 'should create an instance of TenantHashTag' do diff --git a/client/spec/models/tenant_package_spec.rb b/client/spec/models/tenant_package_spec.rb index 61b3c5d..bdd5c0d 100644 --- a/client/spec/models/tenant_package_spec.rb +++ b/client/spec/models/tenant_package_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::TenantPackage do - #let(:instance) { FastCommentsClient::TenantPackage.new } + let(:instance) { FastCommentsClient::TenantPackage.new } describe 'test an instance of TenantPackage' do it 'should create an instance of TenantPackage' do @@ -51,6 +51,12 @@ end end + describe 'test attribute "template_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "monthly_cost_usd"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -309,6 +315,18 @@ end end + describe 'test attribute "flex_llm_cost_cents"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "flex_llm_unit"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "flex_minimum_cost_cents"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -351,4 +369,28 @@ end end + describe 'test attribute "has_ai_agents"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "max_ai_agents"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ai_agent_daily_budget_cents"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ai_agent_monthly_budget_cents"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + end diff --git a/client/spec/models/tos_config_spec.rb b/client/spec/models/tos_config_spec.rb index bf92383..c97a0bc 100644 --- a/client/spec/models/tos_config_spec.rb +++ b/client/spec/models/tos_config_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::TOSConfig do - #let(:instance) { FastCommentsClient::TOSConfig.new } + let(:instance) { FastCommentsClient::TOSConfig.new } describe 'test an instance of TOSConfig' do it 'should create an instance of TOSConfig' do diff --git a/client/spec/models/un_block_comment_public200_response_spec.rb b/client/spec/models/un_block_comment_public200_response_spec.rb deleted file mode 100644 index cf290fe..0000000 --- a/client/spec/models/un_block_comment_public200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::UnBlockCommentPublic200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::UnBlockCommentPublic200Response do -end diff --git a/client/spec/models/un_block_from_comment_params_spec.rb b/client/spec/models/un_block_from_comment_params_spec.rb index 4b49f69..a48767b 100644 --- a/client/spec/models/un_block_from_comment_params_spec.rb +++ b/client/spec/models/un_block_from_comment_params_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UnBlockFromCommentParams do - #let(:instance) { FastCommentsClient::UnBlockFromCommentParams.new } + let(:instance) { FastCommentsClient::UnBlockFromCommentParams.new } describe 'test an instance of UnBlockFromCommentParams' do it 'should create an instance of UnBlockFromCommentParams' do diff --git a/client/spec/models/unblock_success_spec.rb b/client/spec/models/unblock_success_spec.rb index fdf22fc..d612fae 100644 --- a/client/spec/models/unblock_success_spec.rb +++ b/client/spec/models/unblock_success_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UnblockSuccess do - #let(:instance) { FastCommentsClient::UnblockSuccess.new } + let(:instance) { FastCommentsClient::UnblockSuccess.new } describe 'test an instance of UnblockSuccess' do it 'should create an instance of UnblockSuccess' do diff --git a/client/spec/models/updatable_comment_params_spec.rb b/client/spec/models/updatable_comment_params_spec.rb index fa626e0..6df0f3e 100644 --- a/client/spec/models/updatable_comment_params_spec.rb +++ b/client/spec/models/updatable_comment_params_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdatableCommentParams do - #let(:instance) { FastCommentsClient::UpdatableCommentParams.new } + let(:instance) { FastCommentsClient::UpdatableCommentParams.new } describe 'test an instance of UpdatableCommentParams' do it 'should create an instance of UpdatableCommentParams' do diff --git a/client/spec/models/update_api_page_data_spec.rb b/client/spec/models/update_api_page_data_spec.rb index fbf2f74..c93db77 100644 --- a/client/spec/models/update_api_page_data_spec.rb +++ b/client/spec/models/update_api_page_data_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdateAPIPageData do - #let(:instance) { FastCommentsClient::UpdateAPIPageData.new } + let(:instance) { FastCommentsClient::UpdateAPIPageData.new } describe 'test an instance of UpdateAPIPageData' do it 'should create an instance of UpdateAPIPageData' do diff --git a/client/spec/models/update_api_user_subscription_data_spec.rb b/client/spec/models/update_api_user_subscription_data_spec.rb index 0b0509a..76cdc80 100644 --- a/client/spec/models/update_api_user_subscription_data_spec.rb +++ b/client/spec/models/update_api_user_subscription_data_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdateAPIUserSubscriptionData do - #let(:instance) { FastCommentsClient::UpdateAPIUserSubscriptionData.new } + let(:instance) { FastCommentsClient::UpdateAPIUserSubscriptionData.new } describe 'test an instance of UpdateAPIUserSubscriptionData' do it 'should create an instance of UpdateAPIUserSubscriptionData' do diff --git a/client/spec/models/update_apisso_user_data_spec.rb b/client/spec/models/update_apisso_user_data_spec.rb index eff1215..9eec718 100644 --- a/client/spec/models/update_apisso_user_data_spec.rb +++ b/client/spec/models/update_apisso_user_data_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdateAPISSOUserData do - #let(:instance) { FastCommentsClient::UpdateAPISSOUserData.new } + let(:instance) { FastCommentsClient::UpdateAPISSOUserData.new } describe 'test an instance of UpdateAPISSOUserData' do it 'should create an instance of UpdateAPISSOUserData' do diff --git a/client/spec/models/update_domain_config_params_spec.rb b/client/spec/models/update_domain_config_params_spec.rb index fb33c86..02c9d21 100644 --- a/client/spec/models/update_domain_config_params_spec.rb +++ b/client/spec/models/update_domain_config_params_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdateDomainConfigParams do - #let(:instance) { FastCommentsClient::UpdateDomainConfigParams.new } + let(:instance) { FastCommentsClient::UpdateDomainConfigParams.new } describe 'test an instance of UpdateDomainConfigParams' do it 'should create an instance of UpdateDomainConfigParams' do diff --git a/client/spec/models/update_email_template_body_spec.rb b/client/spec/models/update_email_template_body_spec.rb index be3c27d..49bdd89 100644 --- a/client/spec/models/update_email_template_body_spec.rb +++ b/client/spec/models/update_email_template_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdateEmailTemplateBody do - #let(:instance) { FastCommentsClient::UpdateEmailTemplateBody.new } + let(:instance) { FastCommentsClient::UpdateEmailTemplateBody.new } describe 'test an instance of UpdateEmailTemplateBody' do it 'should create an instance of UpdateEmailTemplateBody' do diff --git a/client/spec/models/update_feed_post_params_spec.rb b/client/spec/models/update_feed_post_params_spec.rb index 6599751..4b8112c 100644 --- a/client/spec/models/update_feed_post_params_spec.rb +++ b/client/spec/models/update_feed_post_params_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdateFeedPostParams do - #let(:instance) { FastCommentsClient::UpdateFeedPostParams.new } + let(:instance) { FastCommentsClient::UpdateFeedPostParams.new } describe 'test an instance of UpdateFeedPostParams' do it 'should create an instance of UpdateFeedPostParams' do diff --git a/client/spec/models/update_hash_tag_body_spec.rb b/client/spec/models/update_hash_tag_body_spec.rb index 6f4323e..5dd7338 100644 --- a/client/spec/models/update_hash_tag_body_spec.rb +++ b/client/spec/models/update_hash_tag_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdateHashTagBody do - #let(:instance) { FastCommentsClient::UpdateHashTagBody.new } + let(:instance) { FastCommentsClient::UpdateHashTagBody.new } describe 'test an instance of UpdateHashTagBody' do it 'should create an instance of UpdateHashTagBody' do diff --git a/client/spec/models/update_hash_tag_response_spec.rb b/client/spec/models/update_hash_tag_response_spec.rb index ae613d1..26b1fd4 100644 --- a/client/spec/models/update_hash_tag_response_spec.rb +++ b/client/spec/models/update_hash_tag_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdateHashTagResponse do - #let(:instance) { FastCommentsClient::UpdateHashTagResponse.new } + let(:instance) { FastCommentsClient::UpdateHashTagResponse.new } describe 'test an instance of UpdateHashTagResponse' do it 'should create an instance of UpdateHashTagResponse' do diff --git a/client/spec/models/update_moderator_body_spec.rb b/client/spec/models/update_moderator_body_spec.rb index 2e565f5..e420b40 100644 --- a/client/spec/models/update_moderator_body_spec.rb +++ b/client/spec/models/update_moderator_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdateModeratorBody do - #let(:instance) { FastCommentsClient::UpdateModeratorBody.new } + let(:instance) { FastCommentsClient::UpdateModeratorBody.new } describe 'test an instance of UpdateModeratorBody' do it 'should create an instance of UpdateModeratorBody' do diff --git a/client/spec/models/update_notification_body_spec.rb b/client/spec/models/update_notification_body_spec.rb index da9ea65..8372e85 100644 --- a/client/spec/models/update_notification_body_spec.rb +++ b/client/spec/models/update_notification_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdateNotificationBody do - #let(:instance) { FastCommentsClient::UpdateNotificationBody.new } + let(:instance) { FastCommentsClient::UpdateNotificationBody.new } describe 'test an instance of UpdateNotificationBody' do it 'should create an instance of UpdateNotificationBody' do diff --git a/client/spec/models/update_question_config_body_spec.rb b/client/spec/models/update_question_config_body_spec.rb index 124a1cf..25d6c67 100644 --- a/client/spec/models/update_question_config_body_spec.rb +++ b/client/spec/models/update_question_config_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdateQuestionConfigBody do - #let(:instance) { FastCommentsClient::UpdateQuestionConfigBody.new } + let(:instance) { FastCommentsClient::UpdateQuestionConfigBody.new } describe 'test an instance of UpdateQuestionConfigBody' do it 'should create an instance of UpdateQuestionConfigBody' do diff --git a/client/spec/models/update_question_result_body_spec.rb b/client/spec/models/update_question_result_body_spec.rb index 9a34af0..07b7ed0 100644 --- a/client/spec/models/update_question_result_body_spec.rb +++ b/client/spec/models/update_question_result_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdateQuestionResultBody do - #let(:instance) { FastCommentsClient::UpdateQuestionResultBody.new } + let(:instance) { FastCommentsClient::UpdateQuestionResultBody.new } describe 'test an instance of UpdateQuestionResultBody' do it 'should create an instance of UpdateQuestionResultBody' do diff --git a/client/spec/models/update_subscription_api_response_spec.rb b/client/spec/models/update_subscription_api_response_spec.rb index 2abd1d2..4878423 100644 --- a/client/spec/models/update_subscription_api_response_spec.rb +++ b/client/spec/models/update_subscription_api_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdateSubscriptionAPIResponse do - #let(:instance) { FastCommentsClient::UpdateSubscriptionAPIResponse.new } + let(:instance) { FastCommentsClient::UpdateSubscriptionAPIResponse.new } describe 'test an instance of UpdateSubscriptionAPIResponse' do it 'should create an instance of UpdateSubscriptionAPIResponse' do diff --git a/client/spec/models/update_tenant_body_spec.rb b/client/spec/models/update_tenant_body_spec.rb index 0d6357d..795b198 100644 --- a/client/spec/models/update_tenant_body_spec.rb +++ b/client/spec/models/update_tenant_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdateTenantBody do - #let(:instance) { FastCommentsClient::UpdateTenantBody.new } + let(:instance) { FastCommentsClient::UpdateTenantBody.new } describe 'test an instance of UpdateTenantBody' do it 'should create an instance of UpdateTenantBody' do diff --git a/client/spec/models/update_tenant_package_body_spec.rb b/client/spec/models/update_tenant_package_body_spec.rb index 26fae1d..ef90b8b 100644 --- a/client/spec/models/update_tenant_package_body_spec.rb +++ b/client/spec/models/update_tenant_package_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdateTenantPackageBody do - #let(:instance) { FastCommentsClient::UpdateTenantPackageBody.new } + let(:instance) { FastCommentsClient::UpdateTenantPackageBody.new } describe 'test an instance of UpdateTenantPackageBody' do it 'should create an instance of UpdateTenantPackageBody' do diff --git a/client/spec/models/update_tenant_user_body_spec.rb b/client/spec/models/update_tenant_user_body_spec.rb index 834c5c3..f0e544b 100644 --- a/client/spec/models/update_tenant_user_body_spec.rb +++ b/client/spec/models/update_tenant_user_body_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdateTenantUserBody do - #let(:instance) { FastCommentsClient::UpdateTenantUserBody.new } + let(:instance) { FastCommentsClient::UpdateTenantUserBody.new } describe 'test an instance of UpdateTenantUserBody' do it 'should create an instance of UpdateTenantUserBody' do diff --git a/client/spec/models/update_user_badge200_response_spec.rb b/client/spec/models/update_user_badge200_response_spec.rb deleted file mode 100644 index 8a8d07b..0000000 --- a/client/spec/models/update_user_badge200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::UpdateUserBadge200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::UpdateUserBadge200Response do -end diff --git a/client/spec/models/update_user_badge_params_spec.rb b/client/spec/models/update_user_badge_params_spec.rb index df27dc1..fe7bd61 100644 --- a/client/spec/models/update_user_badge_params_spec.rb +++ b/client/spec/models/update_user_badge_params_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UpdateUserBadgeParams do - #let(:instance) { FastCommentsClient::UpdateUserBadgeParams.new } + let(:instance) { FastCommentsClient::UpdateUserBadgeParams.new } describe 'test an instance of UpdateUserBadgeParams' do it 'should create an instance of UpdateUserBadgeParams' do diff --git a/client/spec/models/aggregate_question_results200_response_spec.rb b/client/spec/models/update_user_notification_comment_subscription_status_response_spec.rb similarity index 66% rename from client/spec/models/aggregate_question_results200_response_spec.rb rename to client/spec/models/update_user_notification_comment_subscription_status_response_spec.rb index e88b377..343755f 100644 --- a/client/spec/models/aggregate_question_results200_response_spec.rb +++ b/client/spec/models/update_user_notification_comment_subscription_status_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,8 +14,8 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::AggregateQuestionResults200Response +# Unit tests for FastCommentsClient::UpdateUserNotificationCommentSubscriptionStatusResponse # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::AggregateQuestionResults200Response do +describe FastCommentsClient::UpdateUserNotificationCommentSubscriptionStatusResponse do end diff --git a/client/spec/models/add_hash_tags_bulk200_response_spec.rb b/client/spec/models/update_user_notification_page_subscription_status_response_spec.rb similarity index 66% rename from client/spec/models/add_hash_tags_bulk200_response_spec.rb rename to client/spec/models/update_user_notification_page_subscription_status_response_spec.rb index f6a6951..ab8b153 100644 --- a/client/spec/models/add_hash_tags_bulk200_response_spec.rb +++ b/client/spec/models/update_user_notification_page_subscription_status_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,8 +14,8 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::AddHashTagsBulk200Response +# Unit tests for FastCommentsClient::UpdateUserNotificationPageSubscriptionStatusResponse # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::AddHashTagsBulk200Response do +describe FastCommentsClient::UpdateUserNotificationPageSubscriptionStatusResponse do end diff --git a/client/spec/models/update_user_notification_status200_response_spec.rb b/client/spec/models/update_user_notification_status_response_spec.rb similarity index 79% rename from client/spec/models/update_user_notification_status200_response_spec.rb rename to client/spec/models/update_user_notification_status_response_spec.rb index 078686a..6af38ea 100644 --- a/client/spec/models/update_user_notification_status200_response_spec.rb +++ b/client/spec/models/update_user_notification_status_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -14,8 +14,8 @@ require 'json' require 'date' -# Unit tests for FastCommentsClient::UpdateUserNotificationStatus200Response +# Unit tests for FastCommentsClient::UpdateUserNotificationStatusResponse # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe FastCommentsClient::UpdateUserNotificationStatus200Response do +describe FastCommentsClient::UpdateUserNotificationStatusResponse do end diff --git a/client/spec/models/upload_image_response_spec.rb b/client/spec/models/upload_image_response_spec.rb index e369ff3..abfc4bb 100644 --- a/client/spec/models/upload_image_response_spec.rb +++ b/client/spec/models/upload_image_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UploadImageResponse do - #let(:instance) { FastCommentsClient::UploadImageResponse.new } + let(:instance) { FastCommentsClient::UploadImageResponse.new } describe 'test an instance of UploadImageResponse' do it 'should create an instance of UploadImageResponse' do diff --git a/client/spec/models/user_badge_progress_spec.rb b/client/spec/models/user_badge_progress_spec.rb index 4bcba0f..a506042 100644 --- a/client/spec/models/user_badge_progress_spec.rb +++ b/client/spec/models/user_badge_progress_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UserBadgeProgress do - #let(:instance) { FastCommentsClient::UserBadgeProgress.new } + let(:instance) { FastCommentsClient::UserBadgeProgress.new } describe 'test an instance of UserBadgeProgress' do it 'should create an instance of UserBadgeProgress' do diff --git a/client/spec/models/user_badge_spec.rb b/client/spec/models/user_badge_spec.rb index 6b5f09c..aaf5756 100644 --- a/client/spec/models/user_badge_spec.rb +++ b/client/spec/models/user_badge_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UserBadge do - #let(:instance) { FastCommentsClient::UserBadge.new } + let(:instance) { FastCommentsClient::UserBadge.new } describe 'test an instance of UserBadge' do it 'should create an instance of UserBadge' do diff --git a/client/spec/models/user_notification_count_spec.rb b/client/spec/models/user_notification_count_spec.rb index 8207174..15eba9e 100644 --- a/client/spec/models/user_notification_count_spec.rb +++ b/client/spec/models/user_notification_count_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UserNotificationCount do - #let(:instance) { FastCommentsClient::UserNotificationCount.new } + let(:instance) { FastCommentsClient::UserNotificationCount.new } describe 'test an instance of UserNotificationCount' do it 'should create an instance of UserNotificationCount' do diff --git a/client/spec/models/user_notification_spec.rb b/client/spec/models/user_notification_spec.rb index bcba755..08b198c 100644 --- a/client/spec/models/user_notification_spec.rb +++ b/client/spec/models/user_notification_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UserNotification do - #let(:instance) { FastCommentsClient::UserNotification.new } + let(:instance) { FastCommentsClient::UserNotification.new } describe 'test an instance of UserNotification' do it 'should create an instance of UserNotification' do diff --git a/client/spec/models/user_notification_write_response_spec.rb b/client/spec/models/user_notification_write_response_spec.rb index 7100f71..4c649d0 100644 --- a/client/spec/models/user_notification_write_response_spec.rb +++ b/client/spec/models/user_notification_write_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UserNotificationWriteResponse do - #let(:instance) { FastCommentsClient::UserNotificationWriteResponse.new } + let(:instance) { FastCommentsClient::UserNotificationWriteResponse.new } describe 'test an instance of UserNotificationWriteResponse' do it 'should create an instance of UserNotificationWriteResponse' do diff --git a/client/spec/models/user_presence_data_spec.rb b/client/spec/models/user_presence_data_spec.rb index 8f64c08..662b0cc 100644 --- a/client/spec/models/user_presence_data_spec.rb +++ b/client/spec/models/user_presence_data_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UserPresenceData do - #let(:instance) { FastCommentsClient::UserPresenceData.new } + let(:instance) { FastCommentsClient::UserPresenceData.new } describe 'test an instance of UserPresenceData' do it 'should create an instance of UserPresenceData' do diff --git a/client/spec/models/user_reacts_response_spec.rb b/client/spec/models/user_reacts_response_spec.rb index fcb966e..37c15f2 100644 --- a/client/spec/models/user_reacts_response_spec.rb +++ b/client/spec/models/user_reacts_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UserReactsResponse do - #let(:instance) { FastCommentsClient::UserReactsResponse.new } + let(:instance) { FastCommentsClient::UserReactsResponse.new } describe 'test an instance of UserReactsResponse' do it 'should create an instance of UserReactsResponse' do diff --git a/client/spec/models/user_search_result_spec.rb b/client/spec/models/user_search_result_spec.rb index d32192b..906e77a 100644 --- a/client/spec/models/user_search_result_spec.rb +++ b/client/spec/models/user_search_result_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UserSearchResult do - #let(:instance) { FastCommentsClient::UserSearchResult.new } + let(:instance) { FastCommentsClient::UserSearchResult.new } describe 'test an instance of UserSearchResult' do it 'should create an instance of UserSearchResult' do diff --git a/client/spec/models/user_search_section_result_spec.rb b/client/spec/models/user_search_section_result_spec.rb index 65357a2..575e21c 100644 --- a/client/spec/models/user_search_section_result_spec.rb +++ b/client/spec/models/user_search_section_result_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UserSearchSectionResult do - #let(:instance) { FastCommentsClient::UserSearchSectionResult.new } + let(:instance) { FastCommentsClient::UserSearchSectionResult.new } describe 'test an instance of UserSearchSectionResult' do it 'should create an instance of UserSearchSectionResult' do diff --git a/client/spec/models/user_search_section_spec.rb b/client/spec/models/user_search_section_spec.rb index 6cddd8a..b13797e 100644 --- a/client/spec/models/user_search_section_spec.rb +++ b/client/spec/models/user_search_section_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UserSearchSection do - #let(:instance) { FastCommentsClient::UserSearchSection.new } + let(:instance) { FastCommentsClient::UserSearchSection.new } describe 'test an instance of UserSearchSection' do it 'should create an instance of UserSearchSection' do diff --git a/client/spec/models/user_session_info_spec.rb b/client/spec/models/user_session_info_spec.rb index 5a12786..eed5734 100644 --- a/client/spec/models/user_session_info_spec.rb +++ b/client/spec/models/user_session_info_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::UserSessionInfo do - #let(:instance) { FastCommentsClient::UserSessionInfo.new } + let(:instance) { FastCommentsClient::UserSessionInfo.new } describe 'test an instance of UserSessionInfo' do it 'should create an instance of UserSessionInfo' do diff --git a/client/spec/models/user_spec.rb b/client/spec/models/user_spec.rb index 1755cf5..8548c61 100644 --- a/client/spec/models/user_spec.rb +++ b/client/spec/models/user_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::User do - #let(:instance) { FastCommentsClient::User.new } + let(:instance) { FastCommentsClient::User.new } describe 'test an instance of User' do it 'should create an instance of User' do @@ -261,6 +261,12 @@ end end + describe 'test attribute "agent_approval_notification_frequency"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "last_tenant_notification_sent_date"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/client/spec/models/users_list_location_spec.rb b/client/spec/models/users_list_location_spec.rb new file mode 100644 index 0000000..d0f6566 --- /dev/null +++ b/client/spec/models/users_list_location_spec.rb @@ -0,0 +1,30 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::UsersListLocation +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::UsersListLocation do + let(:instance) { FastCommentsClient::UsersListLocation.new } + + describe 'test an instance of UsersListLocation' do + it 'should create an instance of UsersListLocation' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(FastCommentsClient::UsersListLocation) + end + end + +end diff --git a/client/spec/models/vote_body_params_spec.rb b/client/spec/models/vote_body_params_spec.rb index dba7058..c12e2f8 100644 --- a/client/spec/models/vote_body_params_spec.rb +++ b/client/spec/models/vote_body_params_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::VoteBodyParams do - #let(:instance) { FastCommentsClient::VoteBodyParams.new } + let(:instance) { FastCommentsClient::VoteBodyParams.new } describe 'test an instance of VoteBodyParams' do it 'should create an instance of VoteBodyParams' do diff --git a/client/spec/models/vote_comment200_response_spec.rb b/client/spec/models/vote_comment200_response_spec.rb deleted file mode 100644 index b31bcaa..0000000 --- a/client/spec/models/vote_comment200_response_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -=begin -#fastcomments - -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The version of the OpenAPI document: 0.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for FastCommentsClient::VoteComment200Response -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe FastCommentsClient::VoteComment200Response do -end diff --git a/client/spec/models/vote_delete_response_spec.rb b/client/spec/models/vote_delete_response_spec.rb index 0af26c4..7aae048 100644 --- a/client/spec/models/vote_delete_response_spec.rb +++ b/client/spec/models/vote_delete_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::VoteDeleteResponse do - #let(:instance) { FastCommentsClient::VoteDeleteResponse.new } + let(:instance) { FastCommentsClient::VoteDeleteResponse.new } describe 'test an instance of VoteDeleteResponse' do it 'should create an instance of VoteDeleteResponse' do diff --git a/client/spec/models/vote_response_spec.rb b/client/spec/models/vote_response_spec.rb index 7b3dd34..c66785f 100644 --- a/client/spec/models/vote_response_spec.rb +++ b/client/spec/models/vote_response_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::VoteResponse do - #let(:instance) { FastCommentsClient::VoteResponse.new } + let(:instance) { FastCommentsClient::VoteResponse.new } describe 'test an instance of VoteResponse' do it 'should create an instance of VoteResponse' do @@ -30,10 +30,6 @@ describe 'test attribute "status"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["success", "failed", "pending-verification"]) - # validator.allowable_values.each do |value| - # expect { instance.status = value }.not_to raise_error - # end end end diff --git a/client/spec/models/vote_response_status_spec.rb b/client/spec/models/vote_response_status_spec.rb new file mode 100644 index 0000000..893e7d5 --- /dev/null +++ b/client/spec/models/vote_response_status_spec.rb @@ -0,0 +1,21 @@ +=begin +#fastcomments + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 0.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for FastCommentsClient::VoteResponseStatus +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe FastCommentsClient::VoteResponseStatus do +end diff --git a/client/spec/models/vote_response_user_spec.rb b/client/spec/models/vote_response_user_spec.rb index 5464e17..01d5e49 100644 --- a/client/spec/models/vote_response_user_spec.rb +++ b/client/spec/models/vote_response_user_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::VoteResponseUser do - #let(:instance) { FastCommentsClient::VoteResponseUser.new } + let(:instance) { FastCommentsClient::VoteResponseUser.new } describe 'test an instance of VoteResponseUser' do it 'should create an instance of VoteResponseUser' do diff --git a/client/spec/models/vote_style_spec.rb b/client/spec/models/vote_style_spec.rb index 8057b0a..88e29f2 100644 --- a/client/spec/models/vote_style_spec.rb +++ b/client/spec/models/vote_style_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end @@ -18,7 +18,7 @@ # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe FastCommentsClient::VoteStyle do - #let(:instance) { FastCommentsClient::VoteStyle.new } + let(:instance) { FastCommentsClient::VoteStyle.new } describe 'test an instance of VoteStyle' do it 'should create an instance of VoteStyle' do diff --git a/client/spec/spec_helper.rb b/client/spec/spec_helper.rb index bb05ade..d62b031 100644 --- a/client/spec/spec_helper.rb +++ b/client/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech -Generator version: 7.19.0-SNAPSHOT +Generator version: 7.14.0 =end diff --git a/openapi.json b/openapi.json index 7157da6..ca0225c 100644 --- a/openapi.json +++ b/openapi.json @@ -108,6 +108,16 @@ ], "type": "object" }, + "SearchUsersResult": { + "anyOf": [ + { + "$ref": "#/components/schemas/SearchUsersSectionedResponse" + }, + { + "$ref": "#/components/schemas/SearchUsersResponse" + } + ] + }, "CommentHTMLRenderingMode": { "enum": [ 0, @@ -249,6 +259,15 @@ ], "type": "integer" }, + "UsersListLocation": { + "enum": [ + 0, + 1, + 2, + 3 + ], + "type": "integer" + }, "TOSConfig": { "properties": { "enabled": { @@ -459,6 +478,16 @@ "noImageUploads": { "type": "boolean" }, + "allowEmbeds": { + "type": "boolean" + }, + "allowedEmbedDomains": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, "noStyles": { "type": "boolean" }, @@ -476,6 +505,9 @@ "requireSSO": { "type": "boolean" }, + "enableFChat": { + "type": "boolean" + }, "enableResizeHandle": { "type": "boolean" }, @@ -548,6 +580,12 @@ "wrap": { "type": "boolean" }, + "usersListLocation": { + "$ref": "#/components/schemas/UsersListLocation" + }, + "usersListIncludeOffline": { + "type": "boolean" + }, "ticketBaseUrl": { "type": "string" }, @@ -882,6 +920,11 @@ "createdAt": { "type": "string", "format": "date-time" + }, + "type": { + "type": "string", + "nullable": true, + "description": "Discriminator for notifications with a special layout/click handler (e.g. \"feedback-offer\")." } }, "required": [ @@ -1034,550 +1077,742 @@ "CrossPlatform" ] }, - "APIEmptyResponse": { + "GetTranslationsResponse": { "properties": { + "translations": { + "$ref": "#/components/schemas/Record_string.string_" + }, "status": { "$ref": "#/components/schemas/APIStatus" } }, "required": [ + "translations", "status" ], "type": "object" }, - "FeedPostMediaItemAsset": { + "PublicPage": { "properties": { - "w": { + "updatedAt": { "type": "integer", - "format": "int32" + "format": "int64" }, - "h": { + "commentCount": { "type": "integer", "format": "int32" }, - "src": { + "title": { + "type": "string" + }, + "url": { + "type": "string" + }, + "urlId": { "type": "string" } }, "required": [ - "w", - "h", - "src" + "updatedAt", + "commentCount", + "title", + "url", + "urlId" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "FeedPostMediaItem": { + "GetPublicPagesResponse": { "properties": { - "title": { - "type": "string" - }, - "linkUrl": { - "type": "string" + "nextCursor": { + "type": "string", + "nullable": true }, - "sizes": { + "pages": { "items": { - "$ref": "#/components/schemas/FeedPostMediaItemAsset" + "$ref": "#/components/schemas/PublicPage" }, "type": "array" + }, + "status": { + "$ref": "#/components/schemas/APIStatus" } }, "required": [ - "sizes" + "nextCursor", + "pages", + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "FeedPostLink": { + "PagesSortBy": { + "type": "string", + "enum": [ + "updatedAt", + "commentCount", + "title" + ] + }, + "PageUserEntry": { "properties": { - "text": { - "type": "string" + "isPrivate": { + "type": "boolean" }, - "title": { + "avatarSrc": { "type": "string" }, - "description": { + "displayName": { "type": "string" }, - "url": { + "id": { "type": "string" } }, - "type": "object", - "additionalProperties": false - }, - "Int32Map": { - "properties": {}, - "additionalProperties": { - "type": "integer", - "format": "int32" - }, + "required": [ + "displayName", + "id" + ], "type": "object" }, - "FeedPost": { + "PageUsersOnlineResponse": { "properties": { - "_id": { - "type": "string" - }, - "tenantId": { - "type": "string" - }, - "title": { - "type": "string" - }, - "fromUserId": { - "type": "string" - }, - "fromUserDisplayName": { + "nextAfterUserId": { "type": "string", "nullable": true }, - "fromUserAvatar": { + "nextAfterName": { "type": "string", "nullable": true }, - "fromIpHash": { - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "weight": { + "totalCount": { "type": "number", "format": "double" }, - "meta": { - "$ref": "#/components/schemas/Record_string.string_" - }, - "contentHTML": { - "type": "string" - }, - "media": { - "items": { - "$ref": "#/components/schemas/FeedPostMediaItem" - }, - "type": "array" + "anonCount": { + "type": "number", + "format": "double" }, - "links": { + "users": { "items": { - "$ref": "#/components/schemas/FeedPostLink" + "$ref": "#/components/schemas/PageUserEntry" }, "type": "array" }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "reacts": { - "$ref": "#/components/schemas/Int32Map" - }, - "commentCount": { - "type": "integer", - "format": "int32", - "nullable": true + "status": { + "$ref": "#/components/schemas/APIStatus" } }, "required": [ - "_id", - "tenantId", - "createdAt" + "nextAfterUserId", + "nextAfterName", + "totalCount", + "anonCount", + "users", + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "CommentUserBadgeInfo": { + "PageUsersOfflineResponse": { "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "integer", - "format": "int32" - }, - "description": { - "type": "string" - }, - "displayLabel": { - "type": "string", - "nullable": true - }, - "displaySrc": { + "nextAfterUserId": { "type": "string", "nullable": true }, - "backgroundColor": { + "nextAfterName": { "type": "string", "nullable": true }, - "borderColor": { - "type": "string", - "nullable": true + "users": { + "items": { + "$ref": "#/components/schemas/PageUserEntry" + }, + "type": "array" }, - "textColor": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "nextAfterUserId", + "nextAfterName", + "users", + "status" + ], + "type": "object" + }, + "PageUsersInfoResponse": { + "properties": { + "users": { + "items": { + "$ref": "#/components/schemas/PageUserEntry" + }, + "type": "array" }, - "cssClass": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/APIStatus" } }, "required": [ - "id", - "type", - "description" + "users", + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "UserSessionInfo": { + "GetV1PageLikes": { "properties": { - "id": { + "urlIdWS": { "type": "string" }, - "authorized": { + "didLike": { "type": "boolean" }, - "avatarSrc": { - "type": "string", - "nullable": true + "commentCount": { + "type": "integer", + "format": "int32" }, - "badges": { + "likeCount": { + "type": "integer", + "format": "int32" + }, + "status": { + "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "urlIdWS", + "didLike", + "commentCount", + "likeCount", + "status" + ], + "type": "object" + }, + "GetV2PageReactUsersResponse": { + "properties": { + "userNames": { "items": { - "$ref": "#/components/schemas/CommentUserBadgeInfo" + "type": "string" }, "type": "array" }, - "displayLabel": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "email": { - "type": "string", - "nullable": true - }, - "groupIds": { + "status": { + "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "userNames", + "status" + ], + "type": "object" + }, + "Record_string.number_": { + "properties": {}, + "additionalProperties": { + "type": "number", + "format": "double" + }, + "type": "object", + "description": "Construct a type with a set of properties K of type T" + }, + "GetV2PageReacts": { + "properties": { + "reactedIds": { "items": { "type": "string" }, "type": "array" }, - "hasBlockedUsers": { - "type": "boolean" - }, - "isAnonSession": { - "type": "boolean" - }, - "needsTOS": { - "type": "boolean" - }, - "sessionId": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string" + "counts": { + "$ref": "#/components/schemas/Record_string.number_" }, - "websiteUrl": { - "type": "string" + "status": { + "$ref": "#/components/schemas/APIStatus" } }, - "type": "object", - "additionalProperties": false + "required": [ + "status" + ], + "type": "object" }, - "GetPublicFeedPostsResponse": { + "CreateV1PageReact": { "properties": { + "code": { + "type": "string" + }, "status": { "$ref": "#/components/schemas/APIStatus" - }, - "feedPosts": { - "items": { - "$ref": "#/components/schemas/FeedPost" - }, - "type": "array" - }, - "user": { - "allOf": [ - { - "$ref": "#/components/schemas/UserSessionInfo" - } - ], - "nullable": true } }, "required": [ - "status", - "feedPosts" + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "TenantIdWS": { - "type": "string" + "CreateV2PageReact": { + "$ref": "#/components/schemas/CreateV1PageReact" }, - "UserIdWS": { - "type": "string" + "DeleteV1PageReact": { + "$ref": "#/components/schemas/CreateV1PageReact" }, - "UrlIdWS": { - "type": "string" + "DeleteV2PageReact": { + "$ref": "#/components/schemas/CreateV1PageReact" }, - "UserPresenceData": { + "ModerationFilter": { "properties": { - "urlIdWS": { - "$ref": "#/components/schemas/UrlIdWS" + "reviewed": { + "type": "boolean" }, - "userIdWS": { - "$ref": "#/components/schemas/UserIdWS" + "approved": { + "type": "boolean" }, - "tenantIdWS": { - "$ref": "#/components/schemas/TenantIdWS" - } - }, - "type": "object" - }, - "PublicFeedPostsResponse": { - "allOf": [ - { - "properties": { - "myReacts": { - "properties": {}, - "additionalProperties": { - "properties": {}, - "additionalProperties": { - "type": "boolean" - }, - "type": "object" - }, - "type": "object" - } + "isSpam": { + "type": "boolean" + }, + "isBannedUser": { + "type": "boolean" + }, + "isLocked": { + "type": "boolean" + }, + "flagCountGt": { + "type": "number", + "format": "double" + }, + "userId": { + "type": "string" + }, + "urlId": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "moderationGroupIds": { + "items": { + "type": "string" }, - "type": "object" + "type": "array" }, - { - "$ref": "#/components/schemas/GetPublicFeedPostsResponse" + "commentTextSearch": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Text search terms. Each term is matched case-insensitively against the comment text.\nA term wrapped in quotes means exact phrase match." }, - { - "$ref": "#/components/schemas/UserPresenceData" + "exactCommentText": { + "type": "string", + "description": "Set by the `exact=\"...\"` search syntax. The comment text must equal this value exactly\n(case-sensitive, full-string), as opposed to the substring matching of commentTextSearch." } - ] + }, + "type": "object", + "additionalProperties": false }, - "ReactFeedPostResponse": { + "BuildModerationFilterResponse": { "properties": { "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "reactType": { "type": "string" }, - "isUndo": { - "type": "boolean" + "moderationFilter": { + "$ref": "#/components/schemas/ModerationFilter" } }, "required": [ "status", - "reactType", - "isUndo" + "moderationFilter" ], "type": "object", "additionalProperties": false }, - "ReactBodyParams": { + "BuildModerationFilterParams": { "properties": { - "reactType": { + "userId": { + "type": "string" + }, + "tenantId": { + "type": "string" + }, + "filters": { + "type": "string" + }, + "searchFilters": { + "type": "string" + }, + "textSearch": { "type": "string" } }, + "required": [ + "userId", + "tenantId" + ], "type": "object", - "additionalProperties": false + "additionalProperties": {} }, - "UserReactsResponse": { + "ModerationAPICountCommentsResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "reacts": { - "properties": {}, - "additionalProperties": { - "properties": {}, - "additionalProperties": { - "type": "boolean" - }, - "type": "object" - }, - "type": "object" + "count": { + "type": "number", + "format": "double" } }, "required": [ "status", - "reacts" + "count" ], "type": "object", "additionalProperties": false }, - "CreateFeedPostResponse": { + "ModerationAPIGetCommentIdsResponse": { "properties": { + "ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "hasMore": { + "type": "boolean" + }, "status": { "$ref": "#/components/schemas/APIStatus" - }, - "feedPost": { - "$ref": "#/components/schemas/FeedPost" } }, "required": [ - "status", - "feedPost" + "ids", + "hasMore", + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "CreateFeedPostParams": { + "UserId": { + "type": "string" + }, + "CommentUserBadgeInfo": { "properties": { - "title": { + "id": { "type": "string" }, - "contentHTML": { + "type": { + "type": "integer", + "format": "int32" + }, + "description": { "type": "string" }, - "media": { - "items": { - "$ref": "#/components/schemas/FeedPostMediaItem" - }, - "type": "array" + "displayLabel": { + "type": "string", + "nullable": true }, - "links": { - "items": { - "$ref": "#/components/schemas/FeedPostLink" - }, - "type": "array" + "displaySrc": { + "type": "string", + "nullable": true }, - "fromUserId": { - "type": "string" + "backgroundColor": { + "type": "string", + "nullable": true }, - "fromUserDisplayName": { - "type": "string" + "borderColor": { + "type": "string", + "nullable": true }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" + "textColor": { + "type": "string", + "nullable": true }, - "meta": { - "$ref": "#/components/schemas/Record_string.string_" + "cssClass": { + "type": "string", + "nullable": true } }, + "required": [ + "id", + "type", + "description" + ], "type": "object", "additionalProperties": false }, - "UpdateFeedPostParams": { + "ModerationAPIComment": { "properties": { - "title": { - "type": "string" + "isLocalDeleted": { + "type": "boolean" }, - "contentHTML": { - "type": "string" + "replyCount": { + "type": "number", + "format": "double" }, - "media": { + "feedbackResults": { "items": { - "$ref": "#/components/schemas/FeedPostMediaItem" + "type": "string" }, "type": "array" }, - "links": { + "isVotedUp": { + "type": "boolean" + }, + "isVotedDown": { + "type": "boolean" + }, + "myVoteId": { + "type": "string" + }, + "_id": { + "type": "string" + }, + "tenantId": { + "type": "string" + }, + "urlId": { + "type": "string" + }, + "url": { + "type": "string" + }, + "pageTitle": { + "type": "string", + "nullable": true + }, + "userId": { + "allOf": [ + { + "$ref": "#/components/schemas/UserId" + } + ], + "nullable": true + }, + "anonUserId": { + "type": "string", + "nullable": true + }, + "commenterName": { + "type": "string" + }, + "commenterLink": { + "type": "string", + "nullable": true + }, + "commentHTML": { + "type": "string" + }, + "parentId": { + "type": "string", + "nullable": true + }, + "date": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "localDateString": { + "type": "string", + "nullable": true + }, + "votes": { + "type": "number", + "format": "double", + "nullable": true + }, + "votesUp": { + "type": "number", + "format": "double", + "nullable": true + }, + "votesDown": { + "type": "number", + "format": "double", + "nullable": true + }, + "expireAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "reviewed": { + "type": "boolean" + }, + "avatarSrc": { + "type": "string", + "nullable": true + }, + "isSpam": { + "type": "boolean" + }, + "permNotSpam": { + "type": "boolean" + }, + "hasLinks": { + "type": "boolean" + }, + "hasCode": { + "type": "boolean" + }, + "approved": { + "type": "boolean" + }, + "locale": { + "type": "string", + "nullable": true + }, + "isBannedUser": { + "type": "boolean" + }, + "isByAdmin": { + "type": "boolean" + }, + "isByModerator": { + "type": "boolean" + }, + "isPinned": { + "type": "boolean", + "nullable": true + }, + "isLocked": { + "type": "boolean", + "nullable": true + }, + "flagCount": { + "type": "number", + "format": "double", + "nullable": true + }, + "displayLabel": { + "type": "string", + "nullable": true + }, + "badges": { "items": { - "$ref": "#/components/schemas/FeedPostLink" + "$ref": "#/components/schemas/CommentUserBadgeInfo" }, - "type": "array" + "type": "array", + "nullable": true }, - "tags": { + "verified": { + "type": "boolean" + }, + "feedbackIds": { "items": { "type": "string" }, "type": "array" }, - "meta": { - "$ref": "#/components/schemas/Record_string.string_" + "isDeleted": { + "type": "boolean" } }, + "required": [ + "_id", + "tenantId", + "urlId", + "url", + "commenterName", + "commentHTML", + "date", + "approved", + "locale", + "verified" + ], "type": "object", "additionalProperties": false }, - "FeedPostStats": { + "ModerationAPIGetCommentsResponse": { "properties": { - "reacts": { - "$ref": "#/components/schemas/Int32Map" + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "commentCount": { - "type": "integer", - "format": "int32" + "translations": { + "additionalProperties": false, + "type": "object" + }, + "comments": { + "items": { + "$ref": "#/components/schemas/ModerationAPIComment" + }, + "type": "array" + }, + "moderationFilter": { + "$ref": "#/components/schemas/ModerationFilter" } }, + "required": [ + "status", + "translations", + "comments" + ], "type": "object", "additionalProperties": false }, - "FeedPostsStatsResponse": { + "ModerationExportResponse": { "properties": { "status": { - "$ref": "#/components/schemas/APIStatus" + "type": "string" }, - "stats": { - "properties": {}, - "additionalProperties": { - "$ref": "#/components/schemas/FeedPostStats" - }, - "type": "object" + "batchJobId": { + "type": "string" } }, "required": [ "status", - "stats" + "batchJobId" ], "type": "object", "additionalProperties": false }, - "EventLogEntry": { + "ModerationExportStatusResponse": { "properties": { - "_id": { + "status": { "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "tenantId": { + "jobStatus": { "type": "string" }, - "urlId": { - "type": "string" + "recordCount": { + "type": "integer", + "format": "int32" }, - "broadcastId": { + "downloadUrl": { + "type": "string" + } + }, + "required": [ + "status", + "jobStatus", + "recordCount" + ], + "type": "object", + "additionalProperties": false + }, + "ModerationUserSearchProjected": { + "properties": { + "_id": { "type": "string" }, - "data": { + "username": { "type": "string" + }, + "displayName": { + "type": "string", + "nullable": true + }, + "avatarSrc": { + "type": "string", + "nullable": true } }, "required": [ "_id", - "createdAt", - "tenantId", - "urlId", - "broadcastId", - "data" + "username" ], "type": "object", "additionalProperties": false }, - "GetEventLogResponse": { + "ModerationUserSearchResponse": { "properties": { - "events": { + "users": { "items": { - "$ref": "#/components/schemas/EventLogEntry" + "$ref": "#/components/schemas/ModerationUserSearchProjected" }, "type": "array" }, @@ -1586,124 +1821,183 @@ } }, "required": [ - "events", + "users", "status" ], "type": "object" }, - "LiveEventType": { - "enum": [ - "update-badges", - "notification", - "notification-update", - "p-u", - "new-vote", - "deleted-vote", - "new-comment", - "updated-comment", - "deleted-comment", - "cvc", - "new-config", - "thread-state-change", - "fr", - "dfr", - "new-feed-post", - "updated-feed-post", - "deleted-feed-post" - ], - "type": "string" - }, - "TenantId": { - "type": "string" - }, - "UserNotification": { + "ModerationPageSearchProjected": { "properties": { - "_id": { - "type": "string" - }, - "tenantId": { - "$ref": "#/components/schemas/TenantId" - }, - "userId": { - "type": "string", - "nullable": true - }, - "anonUserId": { - "type": "string", - "nullable": true - }, "urlId": { "type": "string" }, "url": { "type": "string" }, - "pageTitle": { - "type": "string", - "nullable": true - }, - "relatedObjectType": { - "$ref": "#/components/schemas/NotificationObjectType" - }, - "relatedObjectId": { + "title": { "type": "string" }, - "viewed": { - "type": "boolean" - }, - "isUnreadMessage": { - "type": "boolean" - }, - "sent": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time" + "commentCount": { + "type": "number", + "format": "double" + } + }, + "required": [ + "urlId", + "url", + "title", + "commentCount" + ], + "type": "object", + "additionalProperties": false + }, + "ModerationPageSearchResponse": { + "properties": { + "pages": { + "items": { + "$ref": "#/components/schemas/ModerationPageSearchProjected" + }, + "type": "array" }, - "type": { - "$ref": "#/components/schemas/NotificationType" + "status": { + "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "pages", + "status" + ], + "type": "object" + }, + "ModerationSiteSearchProjected": { + "properties": { + "domain": { + "type": "string" }, - "fromCommentId": { + "logoSrc100px": { "type": "string", "nullable": true + } + }, + "required": [ + "domain" + ], + "type": "object", + "additionalProperties": false + }, + "ModerationSiteSearchResponse": { + "properties": { + "sites": { + "items": { + "$ref": "#/components/schemas/ModerationSiteSearchProjected" + }, + "type": "array" }, - "fromVoteId": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "sites", + "status" + ], + "type": "object" + }, + "ModerationCommentSearchResponse": { + "properties": { + "commentCount": { + "type": "integer", + "format": "int32" }, - "fromUserName": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "commentCount", + "status" + ], + "type": "object" + }, + "ModerationSuggestResponse": { + "properties": { + "status": { + "type": "string" }, - "fromUserId": { - "type": "string", - "nullable": true + "pages": { + "items": { + "$ref": "#/components/schemas/ModerationPageSearchProjected" + }, + "type": "array" }, - "fromUserAvatarSrc": { - "type": "string", - "nullable": true + "users": { + "items": { + "$ref": "#/components/schemas/ModerationUserSearchProjected" + }, + "type": "array" }, - "optedOut": { - "type": "boolean" + "code": { + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object", + "additionalProperties": false + }, + "PreBanSummary": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "usernames": { + "items": { + "type": "string" + }, + "type": "array" }, "count": { + "type": "number", + "format": "double" + } + }, + "required": [ + "status", + "usernames", + "count" + ], + "type": "object", + "additionalProperties": false + }, + "BulkPreBanSummary": { + "properties": { + "status": { + "type": "string" + }, + "totalRelatedCommentCount": { "type": "integer", - "format": "int64" + "format": "int32" }, - "relatedIds": { + "emailDomains": { "items": { "type": "string" }, "type": "array" }, - "fromUserIds": { + "emails": { "items": { "type": "string" }, "type": "array" }, - "fromUserNames": { + "userIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "ipHashes": { "items": { "type": "string" }, @@ -1711,23 +2005,32 @@ } }, "required": [ - "_id", - "tenantId", - "urlId", - "url", - "relatedObjectType", - "relatedObjectId", - "viewed", - "isUnreadMessage", - "sent", - "createdAt", - "type", - "optedOut" + "status", + "totalRelatedCommentCount", + "emailDomains", + "emails", + "userIds", + "ipHashes" ], "type": "object", "additionalProperties": false }, - "PubSubVote": { + "BulkPreBanParams": { + "properties": { + "commentIds": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "commentIds" + ], + "type": "object", + "additionalProperties": false + }, + "APIBannedUser": { "properties": { "_id": { "type": "string" @@ -1735,52 +2038,61 @@ "tenantId": { "type": "string" }, - "urlId": { + "userId": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string", + "nullable": true + }, + "username": { + "type": "string", + "nullable": true + }, + "ipHash": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "bannedByUserId": { "type": "string" }, - "urlIdRaw": { + "bannedCommentText": { "type": "string" }, - "commentId": { + "banType": { "type": "string" }, - "userId": { + "bannedUntil": { "type": "string", + "format": "date-time", "nullable": true }, - "direction": { - "type": "integer", - "format": "int32" + "hasEmailWildcard": { + "type": "boolean" }, - "createdAt": { - "type": "integer", - "format": "int64" - }, - "verificationId": { - "type": "string", - "nullable": true + "banReason": { + "type": "string" } }, "required": [ "_id", "tenantId", - "urlId", - "urlIdRaw", - "commentId", - "direction", "createdAt", - "verificationId" + "bannedByUserId", + "bannedCommentText", + "banType", + "bannedUntil", + "hasEmailWildcard" ], "type": "object", "additionalProperties": false }, - "UserId": { - "type": "string" - }, - "FDomain": { - "type": "string" - }, - "PubSubCommentBase": { + "APIBanUserChangedValues": { "properties": { "_id": { "type": "string" @@ -1789,1355 +2101,1647 @@ "type": "string" }, "userId": { - "allOf": [ - { - "$ref": "#/components/schemas/UserId" - } - ], - "nullable": true - }, - "urlId": { - "type": "string" - }, - "commenterName": { - "type": "string" - }, - "commenterLink": { "type": "string", "nullable": true }, - "commentHTML": { - "type": "string" - }, - "comment": { - "type": "string" - }, - "parentId": { + "email": { "type": "string", "nullable": true }, - "votes": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "votesUp": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "votesDown": { - "type": "integer", - "format": "int32", + "username": { + "type": "string", "nullable": true }, - "verified": { - "type": "boolean" - }, - "avatarSrc": { + "ipHash": { "type": "string", "nullable": true }, - "hasImages": { - "type": "boolean" - }, - "hasLinks": { - "type": "boolean" - }, - "isByAdmin": { - "type": "boolean" + "createdAt": { + "type": "string", + "format": "date-time" }, - "isByModerator": { - "type": "boolean" + "bannedByUserId": { + "type": "string" }, - "isPinned": { - "type": "boolean", - "nullable": true + "bannedCommentText": { + "type": "string" }, - "isLocked": { - "type": "boolean", - "nullable": true + "banType": { + "type": "string" }, - "displayLabel": { + "bannedUntil": { "type": "string", + "format": "date-time", "nullable": true }, - "rating": { - "type": "number", - "format": "double", - "nullable": true - }, - "badges": { - "items": { - "$ref": "#/components/schemas/CommentUserBadgeInfo" - }, - "type": "array", - "nullable": true - }, - "viewCount": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "isDeleted": { - "type": "boolean" - }, - "isDeletedUser": { + "hasEmailWildcard": { "type": "boolean" }, - "isSpam": { - "type": "boolean" + "banReason": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "APIBanUserChangeLog": { + "properties": { + "createdBannedUserId": { + "type": "string" }, - "anonUserId": { - "type": "string", - "nullable": true + "updatedBannedUserId": { + "type": "string" }, - "feedbackIds": { + "deletedBannedUsers": { "items": { - "type": "string" + "$ref": "#/components/schemas/APIBannedUser" }, "type": "array" }, - "flagCount": { - "type": "integer", - "format": "int32", - "nullable": true + "changedValuesBefore": { + "$ref": "#/components/schemas/APIBanUserChangedValues" + } + }, + "type": "object", + "additionalProperties": false + }, + "BanUserFromCommentResult": { + "properties": { + "status": { + "type": "string" }, - "domain": { - "allOf": [ + "changelog": { + "$ref": "#/components/schemas/APIBanUserChangeLog" + }, + "code": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object", + "additionalProperties": false + }, + "BannedUserMatchType": { + "type": "string", + "enum": [ + "userId", + "email", + "email-wildcard", + "IP" + ] + }, + "BannedUserMatch": { + "properties": { + "matchedOn": { + "$ref": "#/components/schemas/BannedUserMatchType" + }, + "matchedOnValue": { + "anyOf": [ { - "$ref": "#/components/schemas/FDomain" + "type": "string" + }, + { + "type": "number", + "format": "double" } ], "nullable": true - }, - "url": { + } + }, + "required": [ + "matchedOn", + "matchedOnValue" + ], + "type": "object", + "additionalProperties": false + }, + "APICommentCommonBannedUser": { + "properties": { + "_id": { "type": "string" }, - "pageTitle": { + "userId": { "type": "string", "nullable": true }, - "expireAt": { + "banType": { + "type": "string" + }, + "email": { "type": "string", - "format": "date-time", "nullable": true }, - "reviewed": { - "type": "boolean" - }, - "hasCode": { - "type": "boolean" - }, - "approved": { - "type": "boolean" + "ipHash": { + "type": "string", + "nullable": true }, - "locale": { + "bannedUntil": { "type": "string", + "format": "date-time", "nullable": true }, - "isBannedUser": { + "hasEmailWildcard": { "type": "boolean" }, - "groupIds": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "banReason": { + "type": "string" } }, "required": [ "_id", - "tenantId", - "urlId", - "commenterName", - "commentHTML", - "comment", - "verified", - "url", - "approved", - "locale" + "banType", + "bannedUntil", + "hasEmailWildcard" ], "type": "object", "additionalProperties": false }, - "PubSubComment": { + "APIBannedUserWithMultiMatchInfo": { "allOf": [ - { - "$ref": "#/components/schemas/PubSubCommentBase" - }, { "properties": { - "isLive": { - "type": "boolean" - }, - "hidden": { - "type": "boolean" - }, - "date": { - "type": "string" + "matches": { + "items": { + "$ref": "#/components/schemas/BannedUserMatch" + }, + "type": "array" } }, "required": [ - "date" + "matches" ], "type": "object" + }, + { + "$ref": "#/components/schemas/APICommentCommonBannedUser" } ] }, - "Record_string._before-string-or-null--after-string-or-null__": { - "properties": {}, - "additionalProperties": { - "properties": { - "after": { - "type": "string" + "GetBannedUsersFromCommentResponse": { + "properties": { + "bannedUsers": { + "items": { + "$ref": "#/components/schemas/APIBannedUserWithMultiMatchInfo" }, - "before": { - "type": "string" - } + "type": "array" }, - "required": [ - "after", - "before" - ], - "type": "object" + "code": { + "type": "string", + "enum": [ + "not-found", + "not-logged-in" + ] + }, + "status": { + "$ref": "#/components/schemas/APIStatus" + } }, + "required": [ + "bannedUsers", + "status" + ], + "type": "object" + }, + "APIEmptyResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "BanUserUndoParams": { + "properties": { + "changelog": { + "$ref": "#/components/schemas/APIBanUserChangeLog" + } + }, + "required": [ + "changelog" + ], "type": "object", - "description": "Construct a type with a set of properties K of type T" + "additionalProperties": false }, - "CommentPositions": { - "$ref": "#/components/schemas/Record_string._before-string-or-null--after-string-or-null__" + "DeleteCommentAction": { + "type": "string", + "enum": [ + "already-deleted", + "hard-removed", + "anonymized" + ] }, - "LiveEvent": { + "DeleteCommentResult": { "properties": { - "type": { - "$ref": "#/components/schemas/LiveEventType" - }, - "timestamp": { - "type": "integer", - "format": "int64" - }, - "ts": { - "type": "integer", - "format": "int64" + "action": { + "$ref": "#/components/schemas/DeleteCommentAction" }, - "broadcastId": { + "status": { + "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "action", + "status" + ], + "type": "object" + }, + "RemoveCommentActionResponse": { + "properties": { + "status": { "type": "string" }, - "userId": { + "action": { "type": "string" + } + }, + "required": [ + "status", + "action" + ], + "type": "object", + "additionalProperties": false + }, + "SetCommentApprovedResponse": { + "properties": { + "didResetFlaggedCount": { + "type": "boolean" }, - "badges": { - "items": { - "$ref": "#/components/schemas/CommentUserBadgeInfo" - }, - "type": "array" - }, - "notification": { - "$ref": "#/components/schemas/UserNotification" - }, - "vote": { - "$ref": "#/components/schemas/PubSubVote" - }, - "comment": { - "$ref": "#/components/schemas/PubSubComment" - }, - "feedPost": { - "$ref": "#/components/schemas/FeedPost" - }, - "extraInfo": { - "properties": { - "commentPositions": { - "$ref": "#/components/schemas/CommentPositions" - } - }, - "type": "object" - }, - "config": { - "additionalProperties": false, - "type": "object" + "status": { + "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "ModerationAPICommentLog": { + "properties": { + "date": { + "type": "string", + "format": "date-time" }, - "isClosed": { - "type": "boolean" + "username": { + "type": "string" }, - "uj": { - "items": { - "type": "string" - }, - "type": "array" + "actionName": { + "type": "string" }, - "ul": { + "messageHTML": { + "type": "string" + } + }, + "required": [ + "date", + "actionName", + "messageHTML" + ], + "type": "object", + "additionalProperties": false + }, + "ModerationAPIGetLogsResponse": { + "properties": { + "logs": { "items": { - "type": "string" + "$ref": "#/components/schemas/ModerationAPICommentLog" }, "type": "array" }, - "changes": { - "$ref": "#/components/schemas/Int32Map" + "status": { + "$ref": "#/components/schemas/APIStatus" } }, "required": [ - "type" + "logs", + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "PublicAPIGetCommentTextResponse": { + "ModerationAPICommentResponse": { "properties": { + "comment": { + "$ref": "#/components/schemas/ModerationAPIComment" + }, "status": { "$ref": "#/components/schemas/APIStatus" - }, - "commentText": { - "type": "string" - }, - "sanitizedCommentText": { - "type": "string" } }, "required": [ - "status", - "commentText", - "sanitizedCommentText" + "comment", + "status" ], "type": "object" }, - "SetCommentTextResult": { + "ModerationAPIChildCommentsResponse": { "properties": { - "approved": { - "type": "boolean" + "comments": { + "items": { + "$ref": "#/components/schemas/ModerationAPIComment" + }, + "type": "array" }, - "commentHTML": { - "type": "string" + "status": { + "$ref": "#/components/schemas/APIStatus" } }, "required": [ - "approved", - "commentHTML" + "comments", + "status" + ], + "type": "object" + }, + "CommentsByIdsParams": { + "properties": { + "ids": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "ids" ], "type": "object", "additionalProperties": false }, - "PublicAPISetCommentTextResponse": { + "GetCommentTextResponse": { "properties": { "comment": { - "$ref": "#/components/schemas/SetCommentTextResult" + "type": "string", + "nullable": true }, "status": { "$ref": "#/components/schemas/APIStatus" } }, "required": [ - "comment", "status" ], "type": "object" }, - "CommentUserMentionInfo": { + "SetCommentTextResponse": { "properties": { - "id": { + "newCommentTextHTML": { "type": "string" }, - "tag": { - "type": "string" - }, - "rawTag": { + "status": { + "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "newCommentTextHTML", + "status" + ], + "type": "object" + }, + "SetCommentTextParams": { + "properties": { + "comment": { "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "user", - "sso" - ] - }, - "sent": { - "type": "boolean" } }, "required": [ - "id", - "tag" + "comment" ], "type": "object", "additionalProperties": false }, - "CommentUserHashTagInfo": { + "AdjustVotesResponse": { "properties": { - "id": { - "type": "string" - }, - "tag": { + "status": { "type": "string" }, - "url": { - "type": "string", - "nullable": true - }, - "retain": { - "type": "boolean" + "newCommentVotes": { + "type": "integer", + "format": "int32" } }, "required": [ - "id", - "tag", - "url" + "status", + "newCommentVotes" ], "type": "object", "additionalProperties": false }, - "CommentTextUpdateRequest": { + "AdjustCommentVotesParams": { "properties": { - "comment": { - "type": "string" - }, - "mentions": { - "items": { - "$ref": "#/components/schemas/CommentUserMentionInfo" - }, - "type": "array" - }, - "hashTags": { - "items": { - "$ref": "#/components/schemas/CommentUserHashTagInfo" - }, - "type": "array" + "adjustVoteAmount": { + "type": "number", + "format": "double" } }, "required": [ - "comment" + "adjustVoteAmount" ], "type": "object", "additionalProperties": false }, - "PublicComment": { - "allOf": [ - { - "properties": { - "isUnread": { - "type": "boolean" - }, - "myVoteId": { - "type": "string" - }, - "isVotedDown": { - "type": "boolean" - }, - "isVotedUp": { - "type": "boolean" - }, - "hasChildren": { - "type": "boolean", - "description": "This is always set when asTree=true" - }, - "nestedChildrenCount": { - "type": "integer", - "format": "int32", - "description": "The total nested child count included in this response (may be more available w/ pagination) Only set with asTree=true, otherwise this will be null." - }, - "childCount": { - "type": "integer", - "format": "int32", - "description": "You must ask the API to count children (with asTree=true&countChildren=true), otherwise this will be null. This will be the complete direct child count, whereas children may only contain a subset based on pagination." - }, - "children": { - "items": { - "$ref": "#/components/schemas/PublicComment" - }, - "type": "array" - }, - "isFlagged": { - "type": "boolean" + "VoteResponseUser": { + "properties": { + "sessionId": { + "type": "string", + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "VoteResponse": { + "properties": { + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/APIStatus" }, - "isBlocked": { - "type": "boolean" + { + "type": "string", + "enum": [ + "pending-verification" + ] } - }, - "type": "object" + ] }, - { - "$ref": "#/components/schemas/PublicCommentBase" + "voteId": { + "type": "string" + }, + "isVerified": { + "type": "boolean" + }, + "user": { + "$ref": "#/components/schemas/VoteResponseUser" + }, + "editKey": { + "type": "string" } - ] + }, + "required": [ + "status" + ], + "type": "object", + "additionalProperties": false }, - "PublicCommentBase": { + "VoteDeleteResponse": { "properties": { - "_id": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "wasPendingVote": { + "type": "boolean" + } + }, + "required": [ + "status" + ], + "type": "object", + "additionalProperties": false + }, + "GetCommentBanStatusResponse": { + "properties": { + "status": { "type": "string" }, - "userId": { + "emailDomain": { + "type": "string", + "nullable": true + }, + "canIPBan": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "status", + "emailDomain", + "canIPBan" + ], + "type": "object", + "additionalProperties": false + }, + "APIModerateUserBanPreferences": { + "properties": { + "shouldBanEmail": { + "type": "boolean" + }, + "shouldBanByIP": { + "type": "boolean" + }, + "lastBanType": { + "type": "string" + }, + "lastBanDuration": { + "type": "string" + } + }, + "required": [ + "shouldBanEmail", + "shouldBanByIP", + "lastBanType", + "lastBanDuration" + ], + "type": "object", + "additionalProperties": false + }, + "APIModerateGetUserBanPreferencesResponse": { + "properties": { + "preferences": { "allOf": [ { - "$ref": "#/components/schemas/UserId" + "$ref": "#/components/schemas/APIModerateUserBanPreferences" } ], "nullable": true }, - "commenterName": { + "status": { + "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "preferences", + "status" + ], + "type": "object" + }, + "TenantBadge": { + "properties": { + "_id": { "type": "string" }, - "commenterLink": { - "type": "string", - "nullable": true - }, - "commentHTML": { + "tenantId": { "type": "string" }, - "parentId": { - "type": "string", - "nullable": true + "createdByUserId": { + "type": "string" }, - "date": { + "createdAt": { "type": "string", - "format": "date-time", - "nullable": true + "format": "date-time" }, - "votes": { - "type": "integer", - "format": "int32", - "nullable": true + "enabled": { + "type": "boolean" }, - "votesUp": { - "type": "integer", - "format": "int32", + "urlId": { + "type": "string", "nullable": true }, - "votesDown": { - "type": "integer", - "format": "int32", - "nullable": true + "type": { + "type": "number", + "format": "double" }, - "verified": { - "type": "boolean" + "threshold": { + "type": "number", + "format": "double" }, - "avatarSrc": { - "type": "string", - "nullable": true + "uses": { + "type": "number", + "format": "double" }, - "hasImages": { - "type": "boolean" + "name": { + "type": "string" }, - "isByAdmin": { - "type": "boolean" + "description": { + "type": "string" }, - "isByModerator": { - "type": "boolean" + "displayLabel": { + "type": "string" }, - "isPinned": { - "type": "boolean", + "displaySrc": { + "type": "string", "nullable": true }, - "isLocked": { - "type": "boolean", + "backgroundColor": { + "type": "string", "nullable": true }, - "displayLabel": { + "borderColor": { "type": "string", "nullable": true }, - "rating": { - "type": "number", - "format": "double", + "textColor": { + "type": "string", "nullable": true }, - "badges": { - "items": { - "$ref": "#/components/schemas/CommentUserBadgeInfo" - }, - "type": "array", + "cssClass": { + "type": "string", "nullable": true }, - "viewCount": { - "type": "integer", - "format": "int64", + "veteranUserThresholdMillis": { + "type": "number", + "format": "double", "nullable": true }, - "isDeleted": { - "type": "boolean" - }, - "isDeletedUser": { + "isAwaitingReprocess": { "type": "boolean" }, - "isSpam": { + "isAwaitingDeletion": { "type": "boolean" }, - "anonUserId": { + "replacesBadgeId": { "type": "string", "nullable": true - }, - "feedbackIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "requiresVerification": { - "type": "boolean" - }, - "editKey": { - "type": "string" - }, - "approved": { - "type": "boolean" } }, "required": [ "_id", - "commenterName", - "commentHTML", - "date", - "verified" - ], - "type": "object", - "additionalProperties": false - }, - "Record_string.any_": { - "properties": {}, - "additionalProperties": {}, + "tenantId", + "createdByUserId", + "createdAt", + "enabled", + "type", + "threshold", + "uses", + "name", + "description", + "displayLabel", + "displaySrc", + "backgroundColor", + "borderColor", + "textColor", + "isAwaitingReprocess", + "isAwaitingDeletion" + ], "type": "object", - "description": "Construct a type with a set of properties K of type T" + "additionalProperties": false }, - "GetCommentsResponse_PublicComment_": { + "GetTenantManualBadgesResponse": { "properties": { - "statusCode": { - "type": "integer", - "format": "int32" + "badges": { + "items": { + "$ref": "#/components/schemas/TenantBadge" + }, + "type": "array" }, "status": { + "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "badges", + "status" + ], + "type": "object" + }, + "UserBadge": { + "properties": { + "_id": { "type": "string" }, - "code": { + "userId": { "type": "string" }, - "reason": { + "badgeId": { "type": "string" }, - "translatedWarning": { + "fromTenantId": { "type": "string" }, - "comments": { - "items": { - "$ref": "#/components/schemas/PublicComment" - }, - "type": "array" - }, - "user": { - "allOf": [ - { - "$ref": "#/components/schemas/UserSessionInfo" - } - ], - "nullable": true - }, - "urlIdClean": { - "type": "string" + "createdAt": { + "type": "string", + "format": "date-time" }, - "lastGenDate": { + "type": { "type": "integer", - "format": "int64", - "nullable": true - }, - "includesPastPages": { - "type": "boolean" - }, - "isDemo": { - "type": "boolean", - "enum": [ - true - ], - "nullable": false + "format": "int32" }, - "commentCount": { + "threshold": { "type": "integer", - "format": "int32" + "format": "int64" }, - "isSiteAdmin": { - "type": "boolean" + "description": { + "type": "string" }, - "hasBillingIssue": { - "type": "boolean", - "enum": [ - true - ], - "nullable": false + "displayLabel": { + "type": "string" }, - "moduleData": { - "$ref": "#/components/schemas/Record_string.any_" + "displaySrc": { + "type": "string", + "nullable": true }, - "pageNumber": { - "type": "integer", - "format": "int32" + "backgroundColor": { + "type": "string", + "nullable": true }, - "isWhiteLabeled": { - "type": "boolean" + "borderColor": { + "type": "string", + "nullable": true }, - "isProd": { - "type": "boolean", - "enum": [ - false - ], - "nullable": false + "textColor": { + "type": "string", + "nullable": true }, - "isCrawler": { - "type": "boolean", - "enum": [ - true - ], - "nullable": false + "cssClass": { + "type": "string", + "nullable": true }, - "notificationCount": { + "veteranUserThresholdMillis": { "type": "integer", - "format": "int32" + "format": "int64" }, - "hasMore": { + "displayedOnComments": { "type": "boolean" }, - "isClosed": { - "type": "boolean" + "receivedAt": { + "type": "string", + "format": "date-time" }, - "presencePollState": { + "order": { "type": "integer", "format": "int32" }, - "customConfig": { - "$ref": "#/components/schemas/CustomConfigParameters" + "urlId": { + "type": "string", + "nullable": true } }, "required": [ - "status", - "comments", - "user", - "pageNumber" + "_id", + "userId", + "badgeId", + "fromTenantId", + "createdAt", + "type", + "threshold", + "description", + "displayLabel", + "veteranUserThresholdMillis", + "displayedOnComments", + "receivedAt" ], "type": "object", "additionalProperties": false }, - "GetCommentsResponseWithPresence_PublicComment_": { - "allOf": [ - { - "$ref": "#/components/schemas/GetCommentsResponse_PublicComment_" - }, - { - "$ref": "#/components/schemas/UserPresenceData" - } - ] - }, - "SaveCommentResponseOptimized": { + "GetUserManualBadgesResponse": { "properties": { + "badges": { + "items": { + "$ref": "#/components/schemas/UserBadge" + }, + "type": "array" + }, "status": { "$ref": "#/components/schemas/APIStatus" - }, - "comment": { - "$ref": "#/components/schemas/PublicComment" - }, - "user": { - "allOf": [ - { - "$ref": "#/components/schemas/UserSessionInfo" - } - ], - "nullable": true - }, - "moduleData": { - "$ref": "#/components/schemas/Record_string.any_" } }, "required": [ - "status", - "comment", - "user" + "badges", + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "SaveCommentsResponseWithPresence": { - "allOf": [ - { - "$ref": "#/components/schemas/SaveCommentResponseOptimized" + "AwardUserBadgeResponse": { + "properties": { + "notes": { + "items": { + "type": "string" + }, + "type": "array" }, - { - "properties": { - "userIdWS": { - "$ref": "#/components/schemas/UserIdWS" - } + "badges": { + "items": { + "$ref": "#/components/schemas/CommentUserBadgeInfo" }, - "type": "object" + "type": "array" + }, + "status": { + "$ref": "#/components/schemas/APIStatus" } - ] + }, + "required": [ + "status" + ], + "type": "object" }, - "Record_string.string-or-number_": { - "properties": {}, - "additionalProperties": { - "anyOf": [ - { - "type": "string" + "RemoveUserBadgeResponse": { + "properties": { + "badges": { + "items": { + "$ref": "#/components/schemas/CommentUserBadgeInfo" }, - { - "type": "number", - "format": "double" - } - ] + "type": "array" + }, + "status": { + "$ref": "#/components/schemas/APIStatus" + } }, - "type": "object", - "description": "Construct a type with a set of properties K of type T" + "required": [ + "status" + ], + "type": "object" }, - "CommentData": { + "GetUserTrustFactorResponse": { "properties": { - "date": { - "type": "integer", - "format": "int64" - }, - "localDateString": { - "type": "string" - }, - "localDateHours": { - "type": "integer", - "format": "int32" - }, - "commenterName": { - "type": "string" - }, - "commenterEmail": { - "type": "string", - "nullable": true - }, - "commenterLink": { - "type": "string", - "nullable": true - }, - "comment": { - "type": "string" - }, - "productId": { - "type": "integer", - "format": "int32" - }, - "userId": { - "type": "string", - "nullable": true - }, - "avatarSrc": { - "type": "string", - "nullable": true - }, - "parentId": { - "type": "string", - "nullable": true - }, - "mentions": { - "items": { - "$ref": "#/components/schemas/CommentUserMentionInfo" - }, - "type": "array" - }, - "hashTags": { - "items": { - "$ref": "#/components/schemas/CommentUserHashTagInfo" - }, - "type": "array" - }, - "pageTitle": { - "type": "string" - }, - "isFromMyAccountPage": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "urlId": { - "type": "string" - }, - "meta": { - "additionalProperties": false, - "type": "object" - }, - "moderationGroupIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "rating": { + "manualTrustFactor": { "type": "number", "format": "double" }, - "fromOfflineRestore": { - "type": "boolean" + "autoTrustFactor": { + "type": "number", + "format": "double" }, - "autoplayDelayMS": { - "type": "integer", - "format": "int64" + "status": { + "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "SetUserTrustFactorResponse": { + "properties": { + "previousManualTrustFactor": { + "type": "number", + "format": "double" }, - "feedbackIds": { - "items": { - "type": "string" + "status": { + "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "GetUserInternalProfileResponse": { + "properties": { + "profile": { + "properties": { + "commenterName": { + "type": "string" + }, + "firstCommentDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "ipHash": { + "type": "string" + }, + "countryFlag": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "websiteUrl": { + "type": "string", + "nullable": true + }, + "bio": { + "type": "string" + }, + "karma": { + "type": "number", + "format": "double" + }, + "locale": { + "type": "string" + }, + "verified": { + "type": "boolean" + }, + "avatarSrc": { + "type": "string", + "nullable": true + }, + "displayName": { + "type": "string" + }, + "username": { + "type": "string" + }, + "commenterEmail": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string", + "nullable": true + }, + "anonUserId": { + "type": "string", + "nullable": true + }, + "userId": { + "type": "string", + "nullable": true + } }, - "type": "array" - }, - "questionValues": { - "$ref": "#/components/schemas/Record_string.string-or-number_" + "type": "object" }, - "tos": { - "type": "boolean" + "status": { + "$ref": "#/components/schemas/APIStatus" } }, "required": [ - "commenterName", - "comment", - "url", - "urlId" + "profile", + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "DeletedCommentResultComment": { + "GetBannedUsersCountResponse": { "properties": { - "isDeleted": { - "type": "boolean" - }, - "commentHTML": { - "type": "string" + "totalCount": { + "type": "number", + "format": "double" }, - "commenterName": { + "status": { "type": "string" - }, - "userId": { - "type": "string", - "nullable": true } }, "required": [ - "commentHTML", - "commenterName" + "totalCount", + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "PublicAPIDeleteCommentResponse": { + "GifSearchResponse": { "properties": { - "comment": { - "$ref": "#/components/schemas/DeletedCommentResultComment" - }, - "hardRemoved": { - "type": "boolean" + "images": { + "items": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number", + "format": "double" + } + ] + }, + "type": "array" + }, + "type": "array" }, "status": { "$ref": "#/components/schemas/APIStatus" } }, "required": [ - "hardRemoved", + "images", "status" ], "type": "object" }, - "CheckBlockedCommentsResponse": { + "GifSearchInternalError": { "properties": { - "commentStatuses": { - "$ref": "#/components/schemas/Record_string.boolean_" + "code": { + "type": "string" }, "status": { "$ref": "#/components/schemas/APIStatus" } }, "required": [ - "commentStatuses", + "code", "status" ], "type": "object" }, - "VoteResponseUser": { + "GifGetLargeResponse": { "properties": { - "sessionId": { - "type": "string", - "nullable": true + "src": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/APIStatus" } }, - "type": "object", - "additionalProperties": false + "required": [ + "src", + "status" + ], + "type": "object" }, - "VoteResponse": { + "FeedPostMediaItemAsset": { "properties": { - "status": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIStatus" - }, - { - "type": "string", - "enum": [ - "pending-verification" - ] - } - ] - }, - "voteId": { - "type": "string" - }, - "isVerified": { - "type": "boolean" + "w": { + "type": "integer", + "format": "int32" }, - "user": { - "$ref": "#/components/schemas/VoteResponseUser" + "h": { + "type": "integer", + "format": "int32" }, - "editKey": { + "src": { "type": "string" } }, "required": [ - "status" + "w", + "h", + "src" ], "type": "object", "additionalProperties": false }, - "VoteBodyParams": { + "FeedPostMediaItem": { "properties": { - "commenterEmail": { + "title": { + "type": "string" + }, + "linkUrl": { + "type": "string" + }, + "sizes": { + "items": { + "$ref": "#/components/schemas/FeedPostMediaItemAsset" + }, + "type": "array" + } + }, + "required": [ + "sizes" + ], + "type": "object", + "additionalProperties": false + }, + "FeedPostLink": { + "properties": { + "text": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "Int32Map": { + "properties": {}, + "additionalProperties": { + "type": "integer", + "format": "int32" + }, + "type": "object" + }, + "FeedPost": { + "properties": { + "_id": { + "type": "string" + }, + "tenantId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "fromUserId": { + "type": "string" + }, + "fromUserDisplayName": { "type": "string", "nullable": true }, - "commenterName": { + "fromUserAvatar": { "type": "string", "nullable": true }, - "voteDir": { - "type": "string", - "enum": [ - "up", - "down" - ] + "fromIpHash": { + "type": "string" }, - "url": { + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "weight": { + "type": "number", + "format": "double" + }, + "meta": { + "$ref": "#/components/schemas/Record_string.string_" + }, + "contentHTML": { + "type": "string" + }, + "media": { + "items": { + "$ref": "#/components/schemas/FeedPostMediaItem" + }, + "type": "array" + }, + "links": { + "items": { + "$ref": "#/components/schemas/FeedPostLink" + }, + "type": "array" + }, + "createdAt": { "type": "string", + "format": "date-time" + }, + "reacts": { + "$ref": "#/components/schemas/Int32Map" + }, + "commentCount": { + "type": "integer", + "format": "int32", "nullable": true } }, "required": [ - "commenterEmail", - "commenterName", - "voteDir", - "url" + "_id", + "tenantId", + "createdAt" ], "type": "object", "additionalProperties": false }, - "VoteDeleteResponse": { + "UserSessionInfo": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "id": { + "type": "string" }, - "wasPendingVote": { + "authorized": { + "type": "boolean" + }, + "avatarSrc": { + "type": "string", + "nullable": true + }, + "badges": { + "items": { + "$ref": "#/components/schemas/CommentUserBadgeInfo" + }, + "type": "array" + }, + "displayLabel": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "email": { + "type": "string", + "nullable": true + }, + "groupIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "hasBlockedUsers": { + "type": "boolean" + }, + "isAnonSession": { + "type": "boolean" + }, + "needsTOS": { "type": "boolean" + }, + "sessionId": { + "type": "string", + "nullable": true + }, + "username": { + "type": "string" + }, + "websiteUrl": { + "type": "string" } }, - "required": [ - "status" - ], "type": "object", "additionalProperties": false }, - "GetCommentVoteUserNamesSuccessResponse": { + "GetPublicFeedPostsResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "voteUserNames": { + "feedPosts": { "items": { - "type": "string" + "$ref": "#/components/schemas/FeedPost" }, "type": "array" }, - "hasMore": { - "type": "boolean" + "user": { + "allOf": [ + { + "$ref": "#/components/schemas/UserSessionInfo" + } + ], + "nullable": true } }, "required": [ "status", - "voteUserNames", - "hasMore" + "feedPosts" ], "type": "object", "additionalProperties": false }, - "ChangeCommentPinStatusResponse": { + "TenantIdWS": { + "type": "string" + }, + "UserIdWS": { + "type": "string" + }, + "UrlIdWS": { + "type": "string" + }, + "UserPresenceData": { "properties": { - "commentPositions": { - "$ref": "#/components/schemas/CommentPositions" + "urlIdWS": { + "$ref": "#/components/schemas/UrlIdWS" }, - "status": { - "$ref": "#/components/schemas/APIStatus" + "userIdWS": { + "$ref": "#/components/schemas/UserIdWS" + }, + "tenantIdWS": { + "$ref": "#/components/schemas/TenantIdWS" } }, - "required": [ - "commentPositions", - "status" - ], "type": "object" }, - "BlockSuccess": { + "PublicFeedPostsResponse": { + "allOf": [ + { + "properties": { + "myReacts": { + "properties": {}, + "additionalProperties": { + "properties": {}, + "additionalProperties": { + "type": "boolean" + }, + "type": "object" + }, + "type": "object" + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/GetPublicFeedPostsResponse" + }, + { + "$ref": "#/components/schemas/UserPresenceData" + } + ] + }, + "ReactFeedPostResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "commentStatuses": { - "$ref": "#/components/schemas/Record_string.boolean_" + "reactType": { + "type": "string" + }, + "isUndo": { + "type": "boolean" } }, "required": [ "status", - "commentStatuses" + "reactType", + "isUndo" ], "type": "object", "additionalProperties": false }, - "PublicBlockFromCommentParams": { + "ReactBodyParams": { "properties": { - "commentIds": { - "items": { - "type": "string" + "reactType": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "UserReactsResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "reacts": { + "properties": {}, + "additionalProperties": { + "properties": {}, + "additionalProperties": { + "type": "boolean" + }, + "type": "object" }, - "type": "array", - "nullable": true, - "description": "A list of comment ids to check if are blocked after performing the update." + "type": "object" } }, "required": [ - "commentIds" + "status", + "reacts" ], "type": "object", "additionalProperties": false }, - "UnblockSuccess": { + "CreateFeedPostResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "commentStatuses": { - "$ref": "#/components/schemas/Record_string.boolean_" + "feedPost": { + "$ref": "#/components/schemas/FeedPost" } }, "required": [ "status", - "commentStatuses" + "feedPost" ], "type": "object", "additionalProperties": false }, - "APIUserSubscription": { + "CreateFeedPostParams": { "properties": { - "notificationFrequency": { - "type": "number", - "format": "double" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "pageTitle": { + "title": { "type": "string" }, - "url": { + "contentHTML": { "type": "string" }, - "urlId": { - "type": "string" + "media": { + "items": { + "$ref": "#/components/schemas/FeedPostMediaItem" + }, + "type": "array" }, - "anonUserId": { - "type": "string" + "links": { + "items": { + "$ref": "#/components/schemas/FeedPostLink" + }, + "type": "array" }, - "userId": { + "fromUserId": { "type": "string" }, - "id": { + "fromUserDisplayName": { "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "meta": { + "$ref": "#/components/schemas/Record_string.string_" } }, - "required": [ - "createdAt", - "urlId", - "id" - ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "GetSubscriptionsAPIResponse": { + "UpdateFeedPostParams": { "properties": { - "reason": { + "title": { "type": "string" }, - "code": { + "contentHTML": { "type": "string" }, - "subscriptions": { + "media": { "items": { - "$ref": "#/components/schemas/APIUserSubscription" + "$ref": "#/components/schemas/FeedPostMediaItem" }, "type": "array" }, - "status": { - "type": "string" + "links": { + "items": { + "$ref": "#/components/schemas/FeedPostLink" + }, + "type": "array" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "meta": { + "$ref": "#/components/schemas/Record_string.string_" } }, - "required": [ - "status" - ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "CreateSubscriptionAPIResponse": { + "FeedPostStats": { "properties": { - "reason": { - "type": "string" - }, - "code": { - "type": "string" - }, - "subscription": { - "$ref": "#/components/schemas/APIUserSubscription" + "reacts": { + "$ref": "#/components/schemas/Int32Map" }, + "commentCount": { + "type": "integer", + "format": "int32" + } + }, + "type": "object", + "additionalProperties": false + }, + "FeedPostsStatsResponse": { + "properties": { "status": { - "type": "string" + "$ref": "#/components/schemas/APIStatus" + }, + "stats": { + "properties": {}, + "additionalProperties": { + "$ref": "#/components/schemas/FeedPostStats" + }, + "type": "object" } }, "required": [ - "status" + "status", + "stats" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "CreateAPIUserSubscriptionData": { + "EventLogEntry": { "properties": { - "notificationFrequency": { - "type": "number", - "format": "double" - }, - "pageTitle": { + "_id": { "type": "string" }, - "url": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "tenantId": { "type": "string" }, "urlId": { "type": "string" }, - "anonUserId": { + "broadcastId": { "type": "string" }, - "userId": { + "data": { "type": "string" } }, "required": [ - "urlId" + "_id", + "createdAt", + "tenantId", + "urlId", + "broadcastId", + "data" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "UpdateSubscriptionAPIResponse": { + "GetEventLogResponse": { "properties": { - "reason": { - "type": "string" - }, - "code": { - "type": "string" - }, - "subscription": { - "$ref": "#/components/schemas/APIUserSubscription" + "events": { + "items": { + "$ref": "#/components/schemas/EventLogEntry" + }, + "type": "array" }, "status": { - "type": "string" + "$ref": "#/components/schemas/APIStatus" } }, "required": [ + "events", "status" ], "type": "object" }, - "UpdateAPIUserSubscriptionData": { - "properties": { - "notificationFrequency": { - "type": "number", - "format": "double" - } - }, - "type": "object" + "LiveEventType": { + "enum": [ + "update-badges", + "notification", + "notification-update", + "p-u", + "new-vote", + "deleted-vote", + "new-comment", + "updated-comment", + "deleted-comment", + "cvc", + "new-config", + "thread-state-change", + "fr", + "dfr", + "new-feed-post", + "updated-feed-post", + "deleted-feed-post", + "new-ticket", + "updated-ticket-state", + "updated-ticket-assignment", + "deleted-ticket", + "page-react", + "question-result" + ], + "type": "string" }, - "DeleteSubscriptionAPIResponse": { + "TenantId": { + "type": "string" + }, + "UserNotification": { "properties": { - "reason": { + "_id": { "type": "string" }, - "code": { + "tenantId": { + "$ref": "#/components/schemas/TenantId" + }, + "userId": { + "type": "string", + "nullable": true + }, + "anonUserId": { + "type": "string", + "nullable": true + }, + "urlId": { "type": "string" }, - "status": { - "type": "string" - } - }, - "required": [ - "status" - ], - "type": "object" - }, - "APISSOUser": { - "properties": { - "id": { - "type": "string" - }, - "username": { + "url": { "type": "string" }, - "websiteUrl": { - "type": "string" - }, - "email": { - "type": "string" + "pageTitle": { + "type": "string", + "nullable": true }, - "signUpDate": { - "type": "integer", - "format": "int64" + "relatedObjectType": { + "$ref": "#/components/schemas/NotificationObjectType" }, - "createdFromUrlId": { + "relatedObjectId": { "type": "string" }, - "loginCount": { - "type": "integer", - "format": "int32" - }, - "avatarSrc": { - "type": "string" + "viewed": { + "type": "boolean" }, - "optedInNotifications": { + "isUnreadMessage": { "type": "boolean" }, - "optedInSubscriptionNotifications": { + "sent": { "type": "boolean" }, - "displayLabel": { - "type": "string" + "createdAt": { + "type": "string", + "format": "date-time" }, - "displayName": { - "type": "string" + "type": { + "$ref": "#/components/schemas/NotificationType" }, - "isAccountOwner": { - "type": "boolean" + "fromCommentId": { + "type": "string", + "nullable": true }, - "isAdminAdmin": { - "type": "boolean" + "fromVoteId": { + "type": "string", + "nullable": true }, - "isCommentModeratorAdmin": { - "type": "boolean" + "fromUserName": { + "type": "string", + "nullable": true }, - "isProfileActivityPrivate": { - "type": "boolean" + "fromUserId": { + "type": "string", + "nullable": true }, - "isProfileCommentsPrivate": { - "type": "boolean" + "fromUserAvatarSrc": { + "type": "string", + "nullable": true }, - "isProfileDMDisabled": { + "optedOut": { "type": "boolean" }, - "hasBlockedUsers": { - "type": "boolean" + "count": { + "type": "integer", + "format": "int64" }, - "groupIds": { + "relatedIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "fromUserIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "fromUserNames": { "items": { "type": "string" }, @@ -3145,1908 +3749,2087 @@ } }, "required": [ - "id", - "username", - "websiteUrl", - "email", - "signUpDate", - "createdFromUrlId", - "loginCount", - "avatarSrc", - "optedInNotifications", - "optedInSubscriptionNotifications", - "displayLabel", - "displayName" + "_id", + "tenantId", + "urlId", + "url", + "relatedObjectType", + "relatedObjectId", + "viewed", + "isUnreadMessage", + "sent", + "createdAt", + "type", + "optedOut" ], "type": "object", "additionalProperties": false }, - "GetSSOUserByIdAPIResponse": { + "PubSubVote": { "properties": { - "reason": { + "_id": { "type": "string" }, - "code": { + "tenantId": { "type": "string" }, - "user": { - "$ref": "#/components/schemas/APISSOUser" - }, - "status": { + "urlId": { "type": "string" - } - }, - "required": [ - "status" - ], - "type": "object" - }, - "GetSSOUserByEmailAPIResponse": { - "properties": { - "reason": { + }, + "urlIdRaw": { "type": "string" }, - "code": { + "commentId": { "type": "string" }, - "user": { - "$ref": "#/components/schemas/APISSOUser" + "userId": { + "type": "string", + "nullable": true }, - "status": { - "type": "string" + "direction": { + "type": "integer", + "format": "int32" + }, + "createdAt": { + "type": "integer", + "format": "int64" + }, + "verificationId": { + "type": "string", + "nullable": true } }, "required": [ - "status" + "_id", + "tenantId", + "urlId", + "urlIdRaw", + "commentId", + "direction", + "createdAt", + "verificationId" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "DeleteSSOUserAPIResponse": { + "FDomain": { + "type": "string" + }, + "PubSubCommentBase": { "properties": { - "reason": { + "_id": { "type": "string" }, - "code": { + "tenantId": { "type": "string" }, - "user": { - "$ref": "#/components/schemas/APISSOUser" + "userId": { + "allOf": [ + { + "$ref": "#/components/schemas/UserId" + } + ], + "nullable": true }, - "status": { - "type": "string" - } - }, - "required": [ - "status" - ], - "type": "object" - }, - "PatchSSOUserAPIResponse": { - "properties": { - "reason": { + "urlId": { "type": "string" }, - "code": { + "commenterName": { "type": "string" }, - "user": { - "$ref": "#/components/schemas/APISSOUser" + "commenterLink": { + "type": "string", + "nullable": true }, - "status": { + "commentHTML": { "type": "string" - } - }, - "required": [ - "status" - ], - "type": "object" - }, - "UpdateAPISSOUserData": { - "properties": { - "groupIds": { - "items": { - "type": "string" - }, - "type": "array" }, - "hasBlockedUsers": { - "type": "boolean" + "comment": { + "type": "string" }, - "isProfileDMDisabled": { - "type": "boolean" + "parentId": { + "type": "string", + "nullable": true }, - "isProfileCommentsPrivate": { - "type": "boolean" + "votes": { + "type": "integer", + "format": "int32", + "nullable": true }, - "isProfileActivityPrivate": { - "type": "boolean" + "votesUp": { + "type": "integer", + "format": "int32", + "nullable": true }, - "isCommentModeratorAdmin": { - "type": "boolean" + "votesDown": { + "type": "integer", + "format": "int32", + "nullable": true }, - "isAdminAdmin": { + "verified": { "type": "boolean" }, - "isAccountOwner": { - "type": "boolean" + "avatarSrc": { + "type": "string", + "nullable": true }, - "displayName": { - "type": "string" + "hasImages": { + "type": "boolean" }, - "displayLabel": { - "type": "string" + "hasLinks": { + "type": "boolean" }, - "optedInSubscriptionNotifications": { + "isByAdmin": { "type": "boolean" }, - "optedInNotifications": { + "isByModerator": { "type": "boolean" }, - "avatarSrc": { - "type": "string" + "isPinned": { + "type": "boolean", + "nullable": true }, - "loginCount": { - "type": "integer", - "format": "int32" + "isLocked": { + "type": "boolean", + "nullable": true }, - "createdFromUrlId": { - "type": "string" + "displayLabel": { + "type": "string", + "nullable": true }, - "signUpDate": { + "rating": { + "type": "number", + "format": "double", + "nullable": true + }, + "badges": { + "items": { + "$ref": "#/components/schemas/CommentUserBadgeInfo" + }, + "type": "array", + "nullable": true + }, + "viewCount": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, - "email": { - "type": "string" + "isDeleted": { + "type": "boolean" }, - "websiteUrl": { - "type": "string" + "isDeletedUser": { + "type": "boolean" }, - "username": { - "type": "string" + "isSpam": { + "type": "boolean" }, - "id": { - "type": "string" - } - }, - "type": "object" - }, - "PutSSOUserAPIResponse": { - "properties": { - "reason": { - "type": "string" + "anonUserId": { + "type": "string", + "nullable": true }, - "code": { - "type": "string" + "feedbackIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "user": { + "flagCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "domain": { "allOf": [ { - "$ref": "#/components/schemas/APISSOUser" + "$ref": "#/components/schemas/FDomain" } ], "nullable": true }, - "status": { - "type": "string" - } - }, - "required": [ - "status" - ], - "type": "object" - }, - "AddSSOUserAPIResponse": { - "properties": { - "reason": { - "type": "string" - }, - "code": { - "type": "string" - }, - "user": { - "$ref": "#/components/schemas/APISSOUser" - }, - "status": { + "url": { "type": "string" - } - }, - "required": [ - "status" - ], - "type": "object" - }, - "CreateAPISSOUserData": { - "properties": { - "groupIds": { - "items": { - "type": "string" - }, - "type": "array" }, - "hasBlockedUsers": { - "type": "boolean" + "pageTitle": { + "type": "string", + "nullable": true }, - "isProfileDMDisabled": { - "type": "boolean" + "expireAt": { + "type": "string", + "format": "date-time", + "nullable": true }, - "isProfileCommentsPrivate": { + "reviewed": { "type": "boolean" }, - "isProfileActivityPrivate": { + "hasCode": { "type": "boolean" }, - "isCommentModeratorAdmin": { + "approved": { "type": "boolean" }, - "isAdminAdmin": { - "type": "boolean" + "locale": { + "type": "string", + "nullable": true }, - "isAccountOwner": { + "isBannedUser": { "type": "boolean" }, - "displayName": { - "type": "string" - }, - "displayLabel": { - "type": "string" - }, - "optedInSubscriptionNotifications": { - "type": "boolean" + "groupIds": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + } + }, + "required": [ + "_id", + "tenantId", + "urlId", + "commenterName", + "commentHTML", + "comment", + "verified", + "url", + "approved", + "locale" + ], + "type": "object", + "additionalProperties": false + }, + "PubSubComment": { + "allOf": [ + { + "$ref": "#/components/schemas/PubSubCommentBase" }, - "optedInNotifications": { - "type": "boolean" + { + "properties": { + "isLive": { + "type": "boolean" + }, + "hidden": { + "type": "boolean" + }, + "date": { + "type": "string" + } + }, + "required": [ + "date" + ], + "type": "object" + } + ] + }, + "Record_string._before-string-or-null--after-string-or-null__": { + "properties": {}, + "additionalProperties": { + "properties": { + "after": { + "type": "string", + "nullable": true + }, + "before": { + "type": "string", + "nullable": true + } }, - "avatarSrc": { - "type": "string" + "required": [ + "after", + "before" + ], + "type": "object" + }, + "type": "object", + "description": "Construct a type with a set of properties K of type T" + }, + "CommentPositions": { + "$ref": "#/components/schemas/Record_string._before-string-or-null--after-string-or-null__" + }, + "LiveEvent": { + "properties": { + "type": { + "$ref": "#/components/schemas/LiveEventType" }, - "loginCount": { + "timestamp": { "type": "integer", - "format": "int32" - }, - "createdFromUrlId": { - "type": "string" + "format": "int64" }, - "signUpDate": { + "ts": { "type": "integer", "format": "int64" }, - "email": { + "broadcastId": { "type": "string" }, - "websiteUrl": { + "userId": { "type": "string" }, - "username": { - "type": "string" + "badges": { + "items": { + "$ref": "#/components/schemas/CommentUserBadgeInfo" + }, + "type": "array" + }, + "notification": { + "$ref": "#/components/schemas/UserNotification" + }, + "vote": { + "$ref": "#/components/schemas/PubSubVote" + }, + "comment": { + "$ref": "#/components/schemas/PubSubComment" + }, + "feedPost": { + "$ref": "#/components/schemas/FeedPost" + }, + "extraInfo": { + "properties": { + "commentPositions": { + "$ref": "#/components/schemas/CommentPositions" + } + }, + "type": "object" + }, + "config": { + "additionalProperties": false, + "type": "object" }, - "id": { - "type": "string" - } - }, - "required": [ - "email", - "username", - "id" - ], - "type": "object" - }, - "APIPage": { - "properties": { "isClosed": { "type": "boolean" }, - "accessibleByGroupIds": { + "uj": { "items": { "type": "string" }, "type": "array" }, - "rootCommentCount": { - "type": "integer", - "format": "int64" + "ul": { + "items": { + "type": "string" + }, + "type": "array" }, - "commentCount": { + "sc": { "type": "integer", - "format": "int64" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "title": { - "type": "string" - }, - "url": { - "type": "string" - }, - "urlId": { - "type": "string" + "format": "int32" }, - "id": { - "type": "string" + "changes": { + "$ref": "#/components/schemas/Int32Map" } }, "required": [ - "rootCommentCount", - "commentCount", - "createdAt", - "title", - "urlId", - "id" + "type" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "GetPagesAPIResponse": { + "PublicAPIGetCommentTextResponse": { "properties": { - "reason": { - "type": "string" + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "code": { + "commentText": { "type": "string" }, - "pages": { - "items": { - "$ref": "#/components/schemas/APIPage" - }, - "type": "array" - }, - "status": { + "sanitizedCommentText": { "type": "string" } }, "required": [ - "status" + "status", + "commentText", + "sanitizedCommentText" ], "type": "object" }, - "GetPageByURLIdAPIResponse": { + "SetCommentTextResult": { "properties": { - "reason": { - "type": "string" - }, - "code": { - "type": "string" - }, - "page": { - "$ref": "#/components/schemas/APIPage" + "approved": { + "type": "boolean" }, - "status": { + "commentHTML": { "type": "string" } }, "required": [ - "status" + "approved", + "commentHTML" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "AddPageAPIResponse": { + "PublicAPISetCommentTextResponse": { "properties": { - "reason": { - "type": "string" - }, - "code": { - "type": "string" - }, - "page": { - "$ref": "#/components/schemas/APIPage" + "comment": { + "$ref": "#/components/schemas/SetCommentTextResult" }, "status": { - "type": "string" + "$ref": "#/components/schemas/APIStatus" } }, "required": [ + "comment", "status" ], "type": "object" }, - "CreateAPIPageData": { + "CommentUserMentionInfo": { "properties": { - "accessibleByGroupIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "rootCommentCount": { - "type": "integer", - "format": "int64" - }, - "commentCount": { - "type": "integer", - "format": "int64" - }, - "title": { + "id": { "type": "string" }, - "url": { + "tag": { "type": "string" }, - "urlId": { + "rawTag": { "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "user", + "sso" + ] + }, + "sent": { + "type": "boolean" } }, "required": [ - "title", - "url", - "urlId" + "id", + "tag" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "PatchPageAPIResponse": { + "CommentUserHashTagInfo": { "properties": { - "reason": { + "id": { "type": "string" }, - "code": { + "tag": { "type": "string" }, - "commentsUpdated": { - "type": "integer", - "format": "int64" - }, - "page": { - "$ref": "#/components/schemas/APIPage" + "url": { + "type": "string", + "nullable": true }, - "status": { - "type": "string" + "retain": { + "type": "boolean" } }, "required": [ - "status" + "id", + "tag", + "url" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "UpdateAPIPageData": { + "CommentTextUpdateRequest": { "properties": { - "isClosed": { - "type": "boolean" + "comment": { + "type": "string" }, - "accessibleByGroupIds": { + "mentions": { "items": { - "type": "string" + "$ref": "#/components/schemas/CommentUserMentionInfo" }, "type": "array" }, - "title": { - "type": "string" - }, - "url": { - "type": "string" - }, - "urlId": { - "type": "string" - } - }, - "type": "object" - }, - "DeletePageAPIResponse": { - "properties": { - "reason": { - "type": "string" - }, - "code": { - "type": "string" - }, - "status": { - "type": "string" + "hashTags": { + "items": { + "$ref": "#/components/schemas/CommentUserHashTagInfo" + }, + "type": "array" } }, "required": [ - "status" + "comment" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "PublicVote": { - "properties": { - "id": { - "type": "string" - }, - "urlId": { - "type": "string" - }, - "commentId": { - "type": "string" + "Pick_GetCommentsResponse.Exclude_keyofGetCommentsResponse.lastGenDate-or-pageNumber__": { + "properties": {}, + "additionalProperties": {}, + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" + }, + "Omit_GetCommentsResponse.lastGenDate-or-pageNumber_": { + "$ref": "#/components/schemas/Pick_GetCommentsResponse.Exclude_keyofGetCommentsResponse.lastGenDate-or-pageNumber__", + "description": "Construct a type with the properties of T except for those in type K." + }, + "GetCommentsForUserResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/Omit_GetCommentsResponse.lastGenDate-or-pageNumber_" }, - "userId": { - "type": "string" - }, - "direction": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - } - }, - "required": [ - "id", - "urlId", - "commentId", - "userId", - "direction", - "createdAt" - ], - "type": "object", - "additionalProperties": false - }, - "GetVotesResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "appliedAuthorizedVotes": { - "items": { - "$ref": "#/components/schemas/PublicVote" - }, - "type": "array" - }, - "appliedAnonymousVotes": { - "items": { - "$ref": "#/components/schemas/PublicVote" - }, - "type": "array" - }, - "pendingVotes": { - "items": { - "$ref": "#/components/schemas/PublicVote" + { + "properties": { + "moderatingTenantIds": { + "items": { + "type": "string" + }, + "type": "array" + } }, - "type": "array" + "type": "object" } - }, - "required": [ - "status", - "appliedAuthorizedVotes", - "appliedAnonymousVotes", - "pendingVotes" - ], - "type": "object", - "additionalProperties": false + ] }, - "GetVotesForUserResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "appliedAuthorizedVotes": { - "items": { - "$ref": "#/components/schemas/PublicVote" - }, - "type": "array" - }, - "appliedAnonymousVotes": { - "items": { - "$ref": "#/components/schemas/PublicVote" + "PublicComment": { + "allOf": [ + { + "properties": { + "isUnread": { + "type": "boolean" + }, + "myVoteId": { + "type": "string" + }, + "isVotedDown": { + "type": "boolean" + }, + "isVotedUp": { + "type": "boolean" + }, + "hasChildren": { + "type": "boolean", + "description": "This is always set when asTree=true" + }, + "nestedChildrenCount": { + "type": "integer", + "format": "int32", + "description": "The total nested child count included in this response (may be more available w/ pagination) Only set with asTree=true, otherwise this will be null." + }, + "childCount": { + "type": "integer", + "format": "int32", + "description": "You must ask the API to count children (with asTree=true&countChildren=true), otherwise this will be null. This will be the complete direct child count, whereas children may only contain a subset based on pagination." + }, + "children": { + "items": { + "$ref": "#/components/schemas/PublicComment" + }, + "type": "array" + }, + "isFlagged": { + "type": "boolean" + }, + "isBlocked": { + "type": "boolean" + } }, - "type": "array" + "type": "object" }, - "pendingVotes": { - "items": { - "$ref": "#/components/schemas/PublicVote" - }, - "type": "array" + { + "$ref": "#/components/schemas/PublicCommentBase" } - }, - "required": [ - "status", - "appliedAuthorizedVotes", - "appliedAnonymousVotes", - "pendingVotes" - ], - "type": "object", - "additionalProperties": false - }, - "DigestEmailFrequency": { - "enum": [ - -1, - 0, - 1, - 2 - ], - "type": "integer" + ] }, - "User": { + "PublicCommentBase": { "properties": { "_id": { "type": "string" }, - "tenantId": { - "type": "string", + "userId": { + "allOf": [ + { + "$ref": "#/components/schemas/UserId" + } + ], "nullable": true }, - "username": { + "commenterName": { "type": "string" }, - "displayName": { + "commenterLink": { + "type": "string", + "nullable": true + }, + "commentHTML": { "type": "string" }, - "websiteUrl": { + "parentId": { "type": "string", "nullable": true }, - "email": { + "date": { "type": "string", + "format": "date-time", "nullable": true }, - "pendingEmail": { - "type": "string" - }, - "backupEmail": { - "type": "string" - }, - "pendingBackupEmail": { - "type": "string" - }, - "signUpDate": { + "votes": { "type": "integer", - "format": "int64" - }, - "createdFromUrlId": { - "type": "string", + "format": "int32", "nullable": true }, - "createdFromTenantId": { - "type": "string", + "votesUp": { + "type": "integer", + "format": "int32", "nullable": true }, - "createdFromIpHashed": { - "type": "string" + "votesDown": { + "type": "integer", + "format": "int32", + "nullable": true }, "verified": { "type": "boolean" }, - "loginId": { - "type": "string" - }, - "loginIdDate": { - "type": "integer", - "format": "int64" - }, - "loginCount": { - "type": "integer", - "format": "int32" + "avatarSrc": { + "type": "string", + "nullable": true }, - "optedInNotifications": { + "hasImages": { "type": "boolean" }, - "optedInTenantNotifications": { + "isByAdmin": { "type": "boolean" }, - "hideAccountCode": { + "isByModerator": { "type": "boolean" }, - "avatarSrc": { - "type": "string", + "isPinned": { + "type": "boolean", "nullable": true }, - "isFastCommentsHelpRequestAdmin": { - "type": "boolean" + "isLocked": { + "type": "boolean", + "nullable": true }, - "isHelpRequestAdmin": { - "type": "boolean" + "displayLabel": { + "type": "string", + "nullable": true }, - "isAccountOwner": { - "type": "boolean" + "rating": { + "type": "number", + "format": "double", + "nullable": true }, - "isAdminAdmin": { - "type": "boolean" + "badges": { + "items": { + "$ref": "#/components/schemas/CommentUserBadgeInfo" + }, + "type": "array", + "nullable": true }, - "isBillingAdmin": { - "type": "boolean" + "viewCount": { + "type": "integer", + "format": "int64", + "nullable": true }, - "isAnalyticsAdmin": { + "isDeleted": { "type": "boolean" }, - "isCustomizationAdmin": { + "isDeletedUser": { "type": "boolean" }, - "isManageDataAdmin": { + "isSpam": { "type": "boolean" }, - "isCommentModeratorAdmin": { - "type": "boolean" - }, - "isAPIAdmin": { - "type": "boolean" - }, - "isSiteAdmin": { - "type": "boolean" + "anonUserId": { + "type": "string", + "nullable": true }, - "moderatorIds": { + "feedbackIds": { "items": { "type": "string" }, "type": "array" }, - "isImpersonator": { - "type": "boolean" - }, - "isCouponManager": { + "requiresVerification": { "type": "boolean" }, - "locale": { + "editKey": { "type": "string" }, - "digestEmailFrequency": { - "$ref": "#/components/schemas/DigestEmailFrequency" + "approved": { + "type": "boolean" + } + }, + "required": [ + "_id", + "commenterName", + "commentHTML", + "date", + "verified" + ], + "type": "object", + "additionalProperties": false + }, + "Record_string.any_": { + "properties": {}, + "additionalProperties": {}, + "type": "object", + "description": "Construct a type with a set of properties K of type T" + }, + "GetCommentsResponse_PublicComment_": { + "properties": { + "statusCode": { + "type": "integer", + "format": "int32" }, - "notificationFrequency": { - "type": "number", - "format": "double" + "status": { + "type": "string" }, - "adminNotificationFrequency": { - "type": "number", - "format": "double" + "code": { + "type": "string" }, - "lastTenantNotificationSentDate": { - "type": "string", - "format": "date-time" + "reason": { + "type": "string" }, - "lastReplyNotificationSentDate": { - "type": "string", - "format": "date-time" + "translatedWarning": { + "type": "string" }, - "ignoredAddToMySiteMessages": { - "type": "boolean" + "comments": { + "items": { + "$ref": "#/components/schemas/PublicComment" + }, + "type": "array" }, - "lastLoginDate": { - "type": "string", - "format": "date-time" + "user": { + "allOf": [ + { + "$ref": "#/components/schemas/UserSessionInfo" + } + ], + "nullable": true }, - "displayLabel": { + "urlIdClean": { "type": "string" }, - "isProfileActivityPrivate": { - "type": "boolean" - }, - "isProfileCommentsPrivate": { - "type": "boolean" + "lastGenDate": { + "type": "integer", + "format": "int64", + "nullable": true }, - "isProfileDMDisabled": { + "includesPastPages": { "type": "boolean" }, - "profileCommentApprovalMode": { - "type": "number", - "format": "double" + "isDemo": { + "type": "boolean", + "enum": [ + true + ], + "nullable": false }, - "karma": { - "type": "number", - "format": "double" + "commentCount": { + "type": "integer", + "format": "int32" }, - "passwordHash": { - "type": "string" + "isSiteAdmin": { + "type": "boolean" }, - "averageTicketAckTimeMS": { - "type": "number", - "format": "double", - "nullable": true + "hasBillingIssue": { + "type": "boolean", + "enum": [ + true + ], + "nullable": false }, - "hasBlockedUsers": { - "type": "boolean" + "moduleData": { + "$ref": "#/components/schemas/Record_string.any_" }, - "bio": { - "type": "string" + "pageNumber": { + "type": "integer", + "format": "int32" }, - "headerBackgroundSrc": { - "type": "string" + "isWhiteLabeled": { + "type": "boolean" }, - "countryCode": { - "type": "string" + "isProd": { + "type": "boolean", + "enum": [ + false + ], + "nullable": false }, - "countryFlag": { - "type": "string" + "isCrawler": { + "type": "boolean", + "enum": [ + true + ], + "nullable": false }, - "socialLinks": { - "items": { - "type": "string" - }, - "type": "array" + "notificationCount": { + "type": "integer", + "format": "int32" }, - "hasTwoFactor": { + "hasMore": { "type": "boolean" }, - "isEmailSuppressed": { + "isClosed": { "type": "boolean" + }, + "presencePollState": { + "type": "integer", + "format": "int32" + }, + "customConfig": { + "$ref": "#/components/schemas/CustomConfigParameters" } }, "required": [ - "_id", - "username", - "email", - "signUpDate", - "createdFromTenantId", - "createdFromIpHashed", - "verified", - "loginId", - "loginIdDate" + "status", + "comments", + "user", + "pageNumber" ], "type": "object", "additionalProperties": false }, - "GetUserResponse": { + "GetCommentsResponseWithPresence_PublicComment_": { + "allOf": [ + { + "$ref": "#/components/schemas/GetCommentsResponse_PublicComment_" + }, + { + "$ref": "#/components/schemas/UserPresenceData" + } + ] + }, + "SaveCommentResponseOptimized": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, + "comment": { + "$ref": "#/components/schemas/PublicComment" + }, "user": { - "$ref": "#/components/schemas/User" + "allOf": [ + { + "$ref": "#/components/schemas/UserSessionInfo" + } + ], + "nullable": true + }, + "moduleData": { + "$ref": "#/components/schemas/Record_string.any_" } }, "required": [ "status", + "comment", "user" ], "type": "object", "additionalProperties": false }, - "UserBadge": { + "SaveCommentsResponseWithPresence": { + "allOf": [ + { + "$ref": "#/components/schemas/SaveCommentResponseOptimized" + }, + { + "properties": { + "userIdWS": { + "$ref": "#/components/schemas/UserIdWS" + } + }, + "type": "object" + } + ] + }, + "Record_string.string-or-number_": { + "properties": {}, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number", + "format": "double" + } + ] + }, + "type": "object", + "description": "Construct a type with a set of properties K of type T" + }, + "CommentData": { "properties": { - "_id": { - "type": "string" + "date": { + "type": "integer", + "format": "int64" }, - "userId": { + "localDateString": { "type": "string" }, - "badgeId": { - "type": "string" + "localDateHours": { + "type": "integer", + "format": "int32" }, - "fromTenantId": { + "commenterName": { "type": "string" }, - "createdAt": { + "commenterEmail": { "type": "string", - "format": "date-time" - }, - "type": { - "type": "integer", - "format": "int32" + "nullable": true }, - "threshold": { - "type": "integer", - "format": "int64" + "commenterLink": { + "type": "string", + "nullable": true }, - "description": { + "comment": { "type": "string" }, - "displayLabel": { - "type": "string" + "productId": { + "type": "integer", + "format": "int32" }, - "displaySrc": { + "userId": { "type": "string", "nullable": true }, - "backgroundColor": { + "avatarSrc": { "type": "string", "nullable": true }, - "borderColor": { + "parentId": { "type": "string", "nullable": true }, - "textColor": { - "type": "string", - "nullable": true + "mentions": { + "items": { + "$ref": "#/components/schemas/CommentUserMentionInfo" + }, + "type": "array" }, - "cssClass": { - "type": "string", - "nullable": true + "hashTags": { + "items": { + "$ref": "#/components/schemas/CommentUserHashTagInfo" + }, + "type": "array" }, - "veteranUserThresholdMillis": { + "pageTitle": { + "type": "string" + }, + "isFromMyAccountPage": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "urlId": { + "type": "string" + }, + "meta": { + "additionalProperties": false, + "type": "object" + }, + "moderationGroupIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "rating": { + "type": "number", + "format": "double" + }, + "fromOfflineRestore": { + "type": "boolean" + }, + "autoplayDelayMS": { "type": "integer", "format": "int64" }, - "displayedOnComments": { + "feedbackIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "questionValues": { + "$ref": "#/components/schemas/Record_string.string-or-number_" + }, + "tos": { "type": "boolean" }, - "receivedAt": { - "type": "string", - "format": "date-time" + "botId": { + "type": "string" + } + }, + "required": [ + "commenterName", + "comment", + "url", + "urlId" + ], + "type": "object", + "additionalProperties": false + }, + "DeletedCommentResultComment": { + "properties": { + "isDeleted": { + "type": "boolean" }, - "order": { - "type": "integer", - "format": "int32" + "commentHTML": { + "type": "string" }, - "urlId": { + "commenterName": { + "type": "string" + }, + "userId": { "type": "string", "nullable": true } }, "required": [ - "_id", - "userId", - "badgeId", - "fromTenantId", - "createdAt", - "type", - "threshold", - "description", - "displayLabel", - "veteranUserThresholdMillis", - "displayedOnComments", - "receivedAt" + "commentHTML", + "commenterName" ], "type": "object", "additionalProperties": false }, - "APIGetUserBadgeResponse": { + "PublicAPIDeleteCommentResponse": { "properties": { + "comment": { + "$ref": "#/components/schemas/DeletedCommentResultComment" + }, + "hardRemoved": { + "type": "boolean" + }, "status": { "$ref": "#/components/schemas/APIStatus" - }, - "userBadge": { - "$ref": "#/components/schemas/UserBadge" } }, "required": [ - "status", - "userBadge" + "hardRemoved", + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "APIGetUserBadgesResponse": { + "CheckBlockedCommentsResponse": { "properties": { + "commentStatuses": { + "$ref": "#/components/schemas/Record_string.boolean_" + }, "status": { "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "commentStatuses", + "status" + ], + "type": "object" + }, + "VoteBodyParams": { + "properties": { + "commenterEmail": { + "type": "string", + "nullable": true }, - "userBadges": { - "items": { - "$ref": "#/components/schemas/UserBadge" - }, - "type": "array" + "commenterName": { + "type": "string", + "nullable": true + }, + "voteDir": { + "type": "string", + "enum": [ + "up", + "down" + ] + }, + "url": { + "type": "string", + "nullable": true } }, "required": [ - "status", - "userBadges" + "commenterEmail", + "commenterName", + "voteDir", + "url" ], "type": "object", "additionalProperties": false }, - "APICreateUserBadgeResponse": { + "GetCommentVoteUserNamesSuccessResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "userBadge": { - "$ref": "#/components/schemas/UserBadge" - }, - "notes": { + "voteUserNames": { "items": { "type": "string" }, "type": "array" + }, + "hasMore": { + "type": "boolean" } }, "required": [ "status", - "userBadge" + "voteUserNames", + "hasMore" ], "type": "object", "additionalProperties": false }, - "CreateUserBadgeParams": { + "ChangeCommentPinStatusResponse": { "properties": { - "userId": { - "type": "string" - }, - "badgeId": { - "type": "string" + "commentPositions": { + "$ref": "#/components/schemas/CommentPositions" }, - "displayedOnComments": { - "type": "boolean" + "status": { + "$ref": "#/components/schemas/APIStatus" } }, "required": [ - "userId", - "badgeId" + "commentPositions", + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "APIEmptySuccessResponse": { + "BlockSuccess": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" + }, + "commentStatuses": { + "$ref": "#/components/schemas/Record_string.boolean_" } }, "required": [ - "status" + "status", + "commentStatuses" ], "type": "object", "additionalProperties": false }, - "UpdateUserBadgeParams": { + "PublicBlockFromCommentParams": { "properties": { - "displayedOnComments": { - "type": "boolean" + "commentIds": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true, + "description": "A list of comment ids to check if are blocked after performing the update." } }, + "required": [ + "commentIds" + ], "type": "object", "additionalProperties": false }, - "Record_string.number_": { - "properties": {}, - "additionalProperties": { - "type": "number", - "format": "double" - }, - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, - "UserBadgeProgress": { + "UnblockSuccess": { "properties": { - "_id": { - "type": "string" - }, - "tenantId": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "firstCommentId": { - "type": "string" - }, - "firstCommentDate": { - "type": "string", - "format": "date-time" - }, - "autoTrustFactor": { - "type": "number", - "format": "double" - }, - "manualTrustFactor": { - "type": "number", - "format": "double" - }, - "progress": { - "$ref": "#/components/schemas/Record_string.number_" + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "tosAcceptedAt": { - "type": "string", - "format": "date-time" + "commentStatuses": { + "$ref": "#/components/schemas/Record_string.boolean_" } }, "required": [ - "_id", - "tenantId", - "userId", - "firstCommentId", - "firstCommentDate", - "progress" + "status", + "commentStatuses" ], "type": "object", "additionalProperties": false }, - "APIGetUserBadgeProgressResponse": { + "APIUserSubscription": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "notificationFrequency": { + "type": "number", + "format": "double" }, - "userBadgeProgress": { - "$ref": "#/components/schemas/UserBadgeProgress" + "createdAt": { + "type": "string", + "format": "date-time" + }, + "pageTitle": { + "type": "string" + }, + "url": { + "type": "string" + }, + "urlId": { + "type": "string" + }, + "anonUserId": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "id": { + "type": "string" } }, "required": [ - "status", - "userBadgeProgress" + "createdAt", + "urlId", + "id" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "APIGetUserBadgeProgressListResponse": { + "GetSubscriptionsAPIResponse": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "reason": { + "type": "string" }, - "userBadgeProgresses": { + "code": { + "type": "string" + }, + "subscriptions": { "items": { - "$ref": "#/components/schemas/UserBadgeProgress" + "$ref": "#/components/schemas/APIUserSubscription" }, "type": "array" + }, + "status": { + "type": "string" } }, "required": [ - "status", - "userBadgeProgresses" + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "APITicket": { + "CreateSubscriptionAPIResponse": { "properties": { - "_id": { + "reason": { "type": "string" }, - "urlId": { + "code": { "type": "string" }, - "userId": { - "type": "string" + "subscription": { + "$ref": "#/components/schemas/APIUserSubscription" }, - "managedByTenantId": { + "status": { "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "CreateAPIUserSubscriptionData": { + "properties": { + "notificationFrequency": { + "type": "number", + "format": "double" }, - "assignedUserIds": { - "items": { - "type": "string" - }, - "type": "array" + "pageTitle": { + "type": "string" }, - "subject": { + "url": { "type": "string" }, - "createdAt": { + "urlId": { "type": "string" }, - "state": { - "type": "integer", - "format": "int32" + "anonUserId": { + "type": "string" }, - "fileCount": { - "type": "integer", - "format": "int32" + "userId": { + "type": "string" } }, "required": [ - "_id", - "urlId", - "userId", - "managedByTenantId", - "assignedUserIds", - "subject", - "createdAt", - "state", - "fileCount" + "urlId" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "GetTicketsResponse": { + "UpdateSubscriptionAPIResponse": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "reason": { + "type": "string" }, - "tickets": { - "items": { - "$ref": "#/components/schemas/APITicket" - }, - "type": "array" + "code": { + "type": "string" + }, + "subscription": { + "$ref": "#/components/schemas/APIUserSubscription" + }, + "status": { + "type": "string" } }, "required": [ - "status", - "tickets" + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "CreateTicketResponse": { + "UpdateAPIUserSubscriptionData": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "ticket": { - "$ref": "#/components/schemas/APITicket" + "notificationFrequency": { + "type": "number", + "format": "double" } }, - "required": [ - "status", - "ticket" - ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "CreateTicketBody": { + "DeleteSubscriptionAPIResponse": { "properties": { - "subject": { + "reason": { + "type": "string" + }, + "code": { + "type": "string" + }, + "status": { "type": "string" } }, "required": [ - "subject" + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "APITicketFile": { + "APISSOUser": { "properties": { "id": { "type": "string" }, - "s3Key": { + "username": { "type": "string" }, - "originalFileName": { + "websiteUrl": { "type": "string" }, - "sizeBytes": { + "email": { + "type": "string" + }, + "signUpDate": { "type": "integer", - "format": "int32" + "format": "int64" }, - "contentType": { + "createdFromUrlId": { "type": "string" }, - "uploadedByUserId": { - "type": "string" + "loginCount": { + "type": "integer", + "format": "int32" }, - "uploadedAt": { + "avatarSrc": { "type": "string" }, - "url": { + "optedInNotifications": { + "type": "boolean" + }, + "optedInSubscriptionNotifications": { + "type": "boolean" + }, + "displayLabel": { "type": "string" }, - "expiresAt": { + "displayName": { "type": "string" }, - "expired": { + "isAccountOwner": { "type": "boolean" - } - }, - "required": [ - "id", - "s3Key", - "originalFileName", - "sizeBytes", - "contentType", - "uploadedByUserId", - "uploadedAt", - "url", - "expiresAt" - ], - "type": "object", - "additionalProperties": false - }, - "APITicketDetail": { - "properties": { - "_id": { - "type": "string" - }, - "urlId": { - "type": "string" - }, - "userId": { - "type": "string" }, - "managedByTenantId": { - "type": "string" + "isAdminAdmin": { + "type": "boolean" }, - "assignedUserIds": { - "items": { - "type": "string" - }, - "type": "array" + "isCommentModeratorAdmin": { + "type": "boolean" }, - "subject": { - "type": "string" + "isProfileActivityPrivate": { + "type": "boolean" }, - "createdAt": { - "type": "string" + "isProfileCommentsPrivate": { + "type": "boolean" }, - "state": { - "type": "integer", - "format": "int32" + "isProfileDMDisabled": { + "type": "boolean" }, - "fileCount": { - "type": "integer", - "format": "int32" + "hasBlockedUsers": { + "type": "boolean" }, - "files": { + "groupIds": { "items": { - "$ref": "#/components/schemas/APITicketFile" + "type": "string" }, "type": "array" - }, - "reopenedAt": { - "type": "string", - "nullable": true - }, - "resolvedAt": { - "type": "string", - "nullable": true - }, - "ackAt": { - "type": "string", - "nullable": true } }, "required": [ - "_id", - "urlId", - "userId", - "managedByTenantId", - "assignedUserIds", - "subject", - "createdAt", - "state", - "fileCount", - "files" + "id", + "username", + "websiteUrl", + "email", + "signUpDate", + "createdFromUrlId", + "loginCount", + "avatarSrc", + "optedInNotifications", + "optedInSubscriptionNotifications", + "displayLabel", + "displayName" ], "type": "object", "additionalProperties": false }, - "GetTicketResponse": { + "GetSSOUserByIdAPIResponse": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "reason": { + "type": "string" }, - "ticket": { - "$ref": "#/components/schemas/APITicketDetail" + "code": { + "type": "string" }, - "availableStates": { - "items": { - "type": "number", - "format": "double" - }, - "type": "array" + "user": { + "$ref": "#/components/schemas/APISSOUser" + }, + "status": { + "type": "string" } }, "required": [ - "status", - "ticket", - "availableStates" + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "ChangeTicketStateResponse": { + "GetSSOUserByEmailAPIResponse": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "reason": { + "type": "string" }, - "ticket": { - "$ref": "#/components/schemas/APITicket" + "code": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/APISSOUser" + }, + "status": { + "type": "string" } }, "required": [ - "status", - "ticket" + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "ChangeTicketStateBody": { + "DeleteSSOUserAPIResponse": { "properties": { - "state": { - "type": "integer", - "format": "int32" + "reason": { + "type": "string" + }, + "code": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/APISSOUser" + }, + "status": { + "type": "string" } }, "required": [ - "state" - ], - "type": "object", - "additionalProperties": false - }, - "ImportedSiteType": { - "enum": [ - 0, - 1 + "status" ], - "type": "integer" - }, - "SiteType": { - "$ref": "#/components/schemas/ImportedSiteType" + "type": "object" }, - "APIDomainConfiguration": { + "PatchSSOUserAPIResponse": { "properties": { - "id": { + "reason": { "type": "string" }, - "domain": { + "code": { "type": "string" }, - "emailFromName": { - "type": "string", - "nullable": true - }, - "emailFromEmail": { - "type": "string", - "nullable": true + "user": { + "$ref": "#/components/schemas/APISSOUser" }, - "emailHeaders": { - "$ref": "#/components/schemas/Record_string.string_" + "status": { + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "UpdateAPISSOUserData": { + "properties": { + "groupIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "wpSyncToken": { - "type": "string", - "nullable": true + "hasBlockedUsers": { + "type": "boolean" }, - "wpSynced": { + "isProfileDMDisabled": { "type": "boolean" }, - "wpURL": { - "type": "string", - "nullable": true + "isProfileCommentsPrivate": { + "type": "boolean" }, - "createdAt": { - "type": "string", - "format": "date-time" + "isProfileActivityPrivate": { + "type": "boolean" }, - "autoAddedDate": { - "type": "string", - "format": "date-time" + "isCommentModeratorAdmin": { + "type": "boolean" }, - "siteType": { - "$ref": "#/components/schemas/SiteType" + "isAdminAdmin": { + "type": "boolean" }, - "logoSrc": { - "type": "string", - "nullable": true + "isAccountOwner": { + "type": "boolean" }, - "logoSrc100px": { - "type": "string", - "nullable": true + "displayName": { + "type": "string" }, - "footerUnsubscribeURL": { + "displayLabel": { "type": "string" }, - "disableUnsubscribeLinks": { + "optedInSubscriptionNotifications": { "type": "boolean" - } - }, - "required": [ - "id", - "domain", - "createdAt" - ], - "type": "object", - "additionalProperties": false - }, - "BillingInfo": { - "properties": { - "name": { - "type": "string" }, - "address": { + "optedInNotifications": { + "type": "boolean" + }, + "avatarSrc": { "type": "string" }, - "city": { + "loginCount": { + "type": "integer", + "format": "int32" + }, + "createdFromUrlId": { "type": "string" }, - "state": { + "signUpDate": { + "type": "integer", + "format": "int64" + }, + "email": { "type": "string" }, - "zip": { + "websiteUrl": { "type": "string" }, - "country": { + "username": { "type": "string" }, - "currency": { - "type": "string", - "nullable": true, - "description": "Currency for invoices." + "id": { + "type": "string" + } + }, + "type": "object" + }, + "PutSSOUserAPIResponse": { + "properties": { + "reason": { + "type": "string" }, - "email": { - "type": "string", - "description": "Email for invoices." + "code": { + "type": "string" + }, + "user": { + "allOf": [ + { + "$ref": "#/components/schemas/APISSOUser" + } + ], + "nullable": true + }, + "status": { + "type": "string" } }, "required": [ - "name", - "address", - "city", - "state", - "zip", - "country" + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "APITenant": { + "AddSSOUserAPIResponse": { "properties": { - "id": { - "type": "string" - }, - "name": { + "reason": { "type": "string" }, - "email": { + "code": { "type": "string" }, - "signUpDate": { - "type": "number", - "format": "double" + "user": { + "$ref": "#/components/schemas/APISSOUser" }, - "packageId": { + "status": { "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "CreateAPISSOUserData": { + "properties": { + "groupIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "paymentFrequency": { - "type": "number", - "format": "double" - }, - "billingInfoValid": { + "hasBlockedUsers": { "type": "boolean" }, - "billingHandledExternally": { + "isProfileDMDisabled": { "type": "boolean" }, - "createdBy": { - "type": "string" + "isProfileCommentsPrivate": { + "type": "boolean" }, - "isSetup": { + "isProfileActivityPrivate": { "type": "boolean" }, - "domainConfiguration": { - "items": { - "$ref": "#/components/schemas/APIDomainConfiguration" - }, - "type": "array" + "isCommentModeratorAdmin": { + "type": "boolean" }, - "billingInfo": { - "$ref": "#/components/schemas/BillingInfo" + "isAdminAdmin": { + "type": "boolean" }, - "stripeCustomerId": { - "type": "string" + "isAccountOwner": { + "type": "boolean" }, - "stripeSubscriptionId": { + "displayName": { "type": "string" }, - "stripePlanId": { + "displayLabel": { "type": "string" }, - "enableProfanityFilter": { - "type": "boolean" - }, - "enableSpamFilter": { + "optedInSubscriptionNotifications": { "type": "boolean" }, - "lastBillingIssueReminderDate": { - "type": "string", - "format": "date-time" - }, - "removeUnverifiedComments": { + "optedInNotifications": { "type": "boolean" }, - "unverifiedCommentsTTLms": { - "type": "number", - "format": "double", - "nullable": true - }, - "commentsRequireApproval": { - "type": "boolean" + "avatarSrc": { + "type": "string" }, - "autoApproveCommentOnVerification": { - "type": "boolean" + "loginCount": { + "type": "integer", + "format": "int32" }, - "sendProfaneToSpam": { - "type": "boolean" + "createdFromUrlId": { + "type": "string" }, - "hasFlexPricing": { - "type": "boolean" + "signUpDate": { + "type": "integer", + "format": "int64" }, - "hasAuditing": { - "type": "boolean" + "email": { + "type": "string" }, - "flexLastBilledAmount": { - "type": "number", - "format": "double" + "websiteUrl": { + "type": "string" }, - "deAnonIpAddr": { - "type": "number", - "format": "double" + "username": { + "type": "string" }, - "meta": { - "$ref": "#/components/schemas/Record_string.string_" + "id": { + "type": "string" } }, "required": [ - "id", - "name", - "signUpDate", - "packageId", - "paymentFrequency", - "billingInfoValid", - "createdBy", - "isSetup", - "domainConfiguration", - "enableProfanityFilter", - "enableSpamFilter" + "email", + "username", + "id" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "GetTenantResponse": { + "APIPage": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "isClosed": { + "type": "boolean" }, - "tenant": { - "$ref": "#/components/schemas/APITenant" + "accessibleByGroupIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "rootCommentCount": { + "type": "integer", + "format": "int64" + }, + "commentCount": { + "type": "integer", + "format": "int64" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "title": { + "type": "string" + }, + "url": { + "type": "string" + }, + "urlId": { + "type": "string" + }, + "id": { + "type": "string" } }, "required": [ - "status", - "tenant" + "rootCommentCount", + "commentCount", + "createdAt", + "title", + "urlId", + "id" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "GetTenantsResponse": { + "GetPagesAPIResponse": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "reason": { + "type": "string" }, - "tenants": { + "code": { + "type": "string" + }, + "pages": { "items": { - "$ref": "#/components/schemas/APITenant" + "$ref": "#/components/schemas/APIPage" }, "type": "array" - } - }, - "required": [ - "status", - "tenants" - ], - "type": "object", - "additionalProperties": false - }, - "CreateTenantResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" }, - "tenant": { - "$ref": "#/components/schemas/APITenant" + "status": { + "type": "string" } }, "required": [ - "status", - "tenant" + "status" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "CreateTenantBody": { + "GetPageByURLIdAPIResponse": { "properties": { - "name": { + "reason": { "type": "string" }, - "domainConfiguration": { - "items": { - "$ref": "#/components/schemas/APIDomainConfiguration" - }, - "type": "array" - }, - "email": { + "code": { "type": "string" }, - "signUpDate": { - "type": "number", - "format": "double" + "page": { + "$ref": "#/components/schemas/APIPage" }, - "packageId": { + "status": { + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "AddPageAPIResponse": { + "properties": { + "reason": { "type": "string" }, - "paymentFrequency": { - "type": "number", - "format": "double" - }, - "billingInfoValid": { - "type": "boolean" + "code": { + "type": "string" }, - "billingHandledExternally": { - "type": "boolean" + "page": { + "$ref": "#/components/schemas/APIPage" }, - "createdBy": { + "status": { "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "CreateAPIPageData": { + "properties": { + "accessibleByGroupIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "isSetup": { - "type": "boolean" + "rootCommentCount": { + "type": "integer", + "format": "int64" }, - "billingInfo": { - "$ref": "#/components/schemas/BillingInfo" + "commentCount": { + "type": "integer", + "format": "int64" }, - "stripeCustomerId": { + "title": { "type": "string" }, - "stripeSubscriptionId": { + "url": { "type": "string" }, - "stripePlanId": { + "urlId": { "type": "string" - }, - "enableProfanityFilter": { - "type": "boolean" - }, - "enableSpamFilter": { - "type": "boolean" - }, - "removeUnverifiedComments": { - "type": "boolean" - }, - "unverifiedCommentsTTLms": { - "type": "number", - "format": "double" - }, - "commentsRequireApproval": { - "type": "boolean" - }, - "autoApproveCommentOnVerification": { - "type": "boolean" - }, - "sendProfaneToSpam": { - "type": "boolean" - }, - "deAnonIpAddr": { - "type": "number", - "format": "double" - }, - "meta": { - "$ref": "#/components/schemas/Record_string.string_" } }, "required": [ - "name", - "domainConfiguration" + "title", + "url", + "urlId" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "UpdateTenantBody": { + "PatchPageAPIResponse": { "properties": { - "name": { - "type": "string" - }, - "email": { + "reason": { "type": "string" }, - "signUpDate": { - "type": "number", - "format": "double" - }, - "packageId": { + "code": { "type": "string" }, - "paymentFrequency": { - "type": "number", - "format": "double" - }, - "billingInfoValid": { - "type": "boolean" + "commentsUpdated": { + "type": "integer", + "format": "int64" }, - "billingHandledExternally": { - "type": "boolean" + "page": { + "$ref": "#/components/schemas/APIPage" }, - "createdBy": { + "status": { "type": "string" - }, - "isSetup": { + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "UpdateAPIPageData": { + "properties": { + "isClosed": { "type": "boolean" }, - "domainConfiguration": { + "accessibleByGroupIds": { "items": { - "$ref": "#/components/schemas/APIDomainConfiguration" + "type": "string" }, "type": "array" }, - "billingInfo": { - "$ref": "#/components/schemas/BillingInfo" - }, - "stripeCustomerId": { + "title": { "type": "string" }, - "stripeSubscriptionId": { + "url": { "type": "string" }, - "stripePlanId": { + "urlId": { + "type": "string" + } + }, + "type": "object" + }, + "DeletePageAPIResponse": { + "properties": { + "reason": { "type": "string" }, - "enableProfanityFilter": { - "type": "boolean" - }, - "enableSpamFilter": { - "type": "boolean" - }, - "removeUnverifiedComments": { - "type": "boolean" - }, - "unverifiedCommentsTTLms": { - "type": "number", - "format": "double" - }, - "commentsRequireApproval": { - "type": "boolean" + "code": { + "type": "string" }, - "autoApproveCommentOnVerification": { - "type": "boolean" + "status": { + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "PublicVote": { + "properties": { + "id": { + "type": "string" }, - "sendProfaneToSpam": { - "type": "boolean" + "urlId": { + "type": "string" }, - "deAnonIpAddr": { - "type": "number", - "format": "double" + "commentId": { + "type": "string" }, - "meta": { - "$ref": "#/components/schemas/Record_string.string_" + "userId": { + "type": "string" }, - "managedByTenantId": { + "direction": { "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" } }, + "required": [ + "id", + "urlId", + "commentId", + "userId", + "direction", + "createdAt" + ], "type": "object", "additionalProperties": false }, - "GetTenantUserResponse": { + "GetVotesResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "tenantUser": { - "$ref": "#/components/schemas/User" + "appliedAuthorizedVotes": { + "items": { + "$ref": "#/components/schemas/PublicVote" + }, + "type": "array" + }, + "appliedAnonymousVotes": { + "items": { + "$ref": "#/components/schemas/PublicVote" + }, + "type": "array" + }, + "pendingVotes": { + "items": { + "$ref": "#/components/schemas/PublicVote" + }, + "type": "array" } }, "required": [ "status", - "tenantUser" + "appliedAuthorizedVotes", + "appliedAnonymousVotes", + "pendingVotes" ], "type": "object", "additionalProperties": false }, - "GetTenantUsersResponse": { + "GetVotesForUserResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "tenantUsers": { + "appliedAuthorizedVotes": { "items": { - "$ref": "#/components/schemas/User" + "$ref": "#/components/schemas/PublicVote" + }, + "type": "array" + }, + "appliedAnonymousVotes": { + "items": { + "$ref": "#/components/schemas/PublicVote" + }, + "type": "array" + }, + "pendingVotes": { + "items": { + "$ref": "#/components/schemas/PublicVote" }, "type": "array" } }, "required": [ "status", - "tenantUsers" + "appliedAuthorizedVotes", + "appliedAnonymousVotes", + "pendingVotes" ], "type": "object", "additionalProperties": false }, - "CreateTenantUserResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "tenantUser": { - "$ref": "#/components/schemas/User" - } - }, - "required": [ - "status", - "tenantUser" + "DigestEmailFrequency": { + "enum": [ + -1, + 0, + 1, + 2 ], - "type": "object", - "additionalProperties": false + "type": "integer" }, - "CreateTenantUserBody": { + "ImportedAgentApprovalNotificationFrequency": { + "enum": [ + -1, + 0, + 1, + 2 + ], + "type": "integer" + }, + "AgentApprovalNotificationFrequency": { + "$ref": "#/components/schemas/ImportedAgentApprovalNotificationFrequency" + }, + "User": { "properties": { - "username": { + "_id": { "type": "string" }, - "email": { + "tenantId": { + "type": "string", + "nullable": true + }, + "username": { "type": "string" }, "displayName": { "type": "string" }, "websiteUrl": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string", + "nullable": true + }, + "pendingEmail": { + "type": "string" + }, + "backupEmail": { + "type": "string" + }, + "pendingBackupEmail": { "type": "string" }, "signUpDate": { - "type": "number", - "format": "double" + "type": "integer", + "format": "int64" }, - "locale": { + "createdFromUrlId": { + "type": "string", + "nullable": true + }, + "createdFromTenantId": { + "type": "string", + "nullable": true + }, + "createdFromIpHashed": { "type": "string" }, "verified": { "type": "boolean" }, + "loginId": { + "type": "string" + }, + "loginIdDate": { + "type": "integer", + "format": "int64" + }, "loginCount": { - "type": "number", - "format": "double" + "type": "integer", + "format": "int32" }, "optedInNotifications": { "type": "boolean" @@ -5058,7 +5841,11 @@ "type": "boolean" }, "avatarSrc": { - "type": "string" + "type": "string", + "nullable": true + }, + "isFastCommentsHelpRequestAdmin": { + "type": "boolean" }, "isHelpRequestAdmin": { "type": "boolean" @@ -5087,3452 +5874,2954 @@ "isAPIAdmin": { "type": "boolean" }, + "isSiteAdmin": { + "type": "boolean" + }, "moderatorIds": { "items": { "type": "string" }, "type": "array" }, - "digestEmailFrequency": { - "type": "number", - "format": "double" - }, - "displayLabel": { - "type": "string" - } - }, - "required": [ - "username", - "email" - ], - "type": "object", - "additionalProperties": false - }, - "ReplaceTenantUserBody": { - "properties": { - "username": { - "type": "string" + "isImpersonator": { + "type": "boolean" }, - "email": { - "type": "string" + "isCouponManager": { + "type": "boolean" }, - "displayName": { + "locale": { "type": "string" }, - "websiteUrl": { - "type": "string" + "digestEmailFrequency": { + "$ref": "#/components/schemas/DigestEmailFrequency" }, - "signUpDate": { + "notificationFrequency": { "type": "number", "format": "double" }, - "locale": { - "type": "string" - }, - "verified": { - "type": "boolean" - }, - "loginCount": { + "adminNotificationFrequency": { "type": "number", "format": "double" }, - "optedInNotifications": { - "type": "boolean" + "agentApprovalNotificationFrequency": { + "$ref": "#/components/schemas/AgentApprovalNotificationFrequency" }, - "optedInTenantNotifications": { - "type": "boolean" + "lastTenantNotificationSentDate": { + "type": "string", + "format": "date-time" }, - "hideAccountCode": { + "lastReplyNotificationSentDate": { + "type": "string", + "format": "date-time" + }, + "ignoredAddToMySiteMessages": { "type": "boolean" }, - "avatarSrc": { - "type": "string" + "lastLoginDate": { + "type": "string", + "format": "date-time" }, - "isHelpRequestAdmin": { - "type": "boolean" + "displayLabel": { + "type": "string" }, - "isAccountOwner": { + "isProfileActivityPrivate": { "type": "boolean" }, - "isAdminAdmin": { + "isProfileCommentsPrivate": { "type": "boolean" }, - "isBillingAdmin": { + "isProfileDMDisabled": { "type": "boolean" }, - "isAnalyticsAdmin": { - "type": "boolean" + "profileCommentApprovalMode": { + "type": "number", + "format": "double" }, - "isCustomizationAdmin": { - "type": "boolean" + "karma": { + "type": "number", + "format": "double" }, - "isManageDataAdmin": { - "type": "boolean" + "passwordHash": { + "type": "string" }, - "isCommentModeratorAdmin": { - "type": "boolean" + "averageTicketAckTimeMS": { + "type": "number", + "format": "double", + "nullable": true }, - "isAPIAdmin": { + "hasBlockedUsers": { "type": "boolean" }, - "moderatorIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "digestEmailFrequency": { - "type": "number", - "format": "double" + "bio": { + "type": "string" }, - "displayLabel": { + "headerBackgroundSrc": { "type": "string" }, - "createdFromUrlId": { + "countryCode": { "type": "string" }, - "createdFromTenantId": { + "countryFlag": { "type": "string" }, - "lastLoginDate": { - "type": "number", - "format": "double" + "socialLinks": { + "items": { + "type": "string" + }, + "type": "array" }, - "karma": { - "type": "number", - "format": "double" + "hasTwoFactor": { + "type": "boolean" + }, + "isEmailSuppressed": { + "type": "boolean" } }, "required": [ + "_id", "username", - "email" + "email", + "signUpDate", + "createdFromTenantId", + "createdFromIpHashed", + "verified", + "loginId", + "loginIdDate" ], "type": "object", "additionalProperties": false }, - "UpdateTenantUserBody": { + "GetUserResponse": { "properties": { - "username": { - "type": "string" - }, - "displayName": { - "type": "string" + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "websiteUrl": { - "type": "string" + "user": { + "$ref": "#/components/schemas/User" + } + }, + "required": [ + "status", + "user" + ], + "type": "object", + "additionalProperties": false + }, + "APIGetUserBadgeResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "email": { - "type": "string" + "userBadge": { + "$ref": "#/components/schemas/UserBadge" + } + }, + "required": [ + "status", + "userBadge" + ], + "type": "object", + "additionalProperties": false + }, + "APIGetUserBadgesResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "signUpDate": { - "type": "number", - "format": "double" + "userBadges": { + "items": { + "$ref": "#/components/schemas/UserBadge" + }, + "type": "array" + } + }, + "required": [ + "status", + "userBadges" + ], + "type": "object", + "additionalProperties": false + }, + "APICreateUserBadgeResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "verified": { - "type": "boolean" + "userBadge": { + "$ref": "#/components/schemas/UserBadge" }, - "loginCount": { - "type": "number", - "format": "double" + "notes": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "status", + "userBadge" + ], + "type": "object", + "additionalProperties": false + }, + "CreateUserBadgeParams": { + "properties": { + "userId": { + "type": "string" }, - "optedInNotifications": { - "type": "boolean" + "badgeId": { + "type": "string" }, - "optedInTenantNotifications": { + "displayedOnComments": { "type": "boolean" - }, - "hideAccountCode": { + } + }, + "required": [ + "userId", + "badgeId" + ], + "type": "object", + "additionalProperties": false + }, + "APIEmptySuccessResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + } + }, + "required": [ + "status" + ], + "type": "object", + "additionalProperties": false + }, + "UpdateUserBadgeParams": { + "properties": { + "displayedOnComments": { "type": "boolean" - }, - "avatarSrc": { + } + }, + "type": "object", + "additionalProperties": false + }, + "UserBadgeProgress": { + "properties": { + "_id": { "type": "string" }, - "isHelpRequestAdmin": { - "type": "boolean" + "tenantId": { + "type": "string" }, - "isAccountOwner": { - "type": "boolean" + "userId": { + "type": "string" }, - "isAdminAdmin": { - "type": "boolean" + "firstCommentId": { + "type": "string" }, - "isBillingAdmin": { - "type": "boolean" + "firstCommentDate": { + "type": "string", + "format": "date-time" }, - "isAnalyticsAdmin": { - "type": "boolean" + "autoTrustFactor": { + "type": "number", + "format": "double" }, - "isCustomizationAdmin": { - "type": "boolean" + "manualTrustFactor": { + "type": "number", + "format": "double" }, - "isManageDataAdmin": { - "type": "boolean" + "progress": { + "$ref": "#/components/schemas/Record_string.number_" }, - "isCommentModeratorAdmin": { - "type": "boolean" + "tosAcceptedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "_id", + "tenantId", + "userId", + "firstCommentId", + "firstCommentDate", + "progress" + ], + "type": "object", + "additionalProperties": false + }, + "APIGetUserBadgeProgressResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "isAPIAdmin": { - "type": "boolean" + "userBadgeProgress": { + "$ref": "#/components/schemas/UserBadgeProgress" + } + }, + "required": [ + "status", + "userBadgeProgress" + ], + "type": "object", + "additionalProperties": false + }, + "APIGetUserBadgeProgressListResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "moderatorIds": { + "userBadgeProgresses": { "items": { - "type": "string" + "$ref": "#/components/schemas/UserBadgeProgress" }, "type": "array" - }, - "locale": { - "type": "string" - }, - "digestEmailFrequency": { - "type": "number", - "format": "double" - }, - "displayLabel": { - "type": "string" } }, + "required": [ + "status", + "userBadgeProgresses" + ], "type": "object", "additionalProperties": false }, - "TenantPackage": { + "APITicket": { "properties": { "_id": { "type": "string" }, - "name": { + "urlId": { "type": "string" }, - "tenantId": { + "userId": { "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time" + "managedByTenantId": { + "type": "string" }, - "monthlyCostUSD": { - "type": "number", - "format": "double", - "nullable": true + "assignedUserIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "yearlyCostUSD": { - "type": "number", - "format": "double", - "nullable": true + "subject": { + "type": "string" }, - "monthlyStripePlanId": { - "type": "string", - "nullable": true - }, - "yearlyStripePlanId": { - "type": "string", - "nullable": true - }, - "maxMonthlyPageLoads": { - "type": "number", - "format": "double" - }, - "maxMonthlyAPICredits": { - "type": "number", - "format": "double" - }, - "maxMonthlySmallWidgetsCredits": { - "type": "number", - "format": "double" - }, - "maxMonthlyComments": { - "type": "number", - "format": "double" - }, - "maxConcurrentUsers": { - "type": "number", - "format": "double" - }, - "maxTenantUsers": { - "type": "number", - "format": "double" - }, - "maxSSOUsers": { - "type": "number", - "format": "double" - }, - "maxModerators": { - "type": "number", - "format": "double" - }, - "maxDomains": { - "type": "number", - "format": "double" - }, - "maxWhiteLabeledTenants": { - "type": "number", - "format": "double" - }, - "maxMonthlyEventLogRequests": { - "type": "number", - "format": "double" - }, - "maxCustomCollectionSize": { - "type": "number", - "format": "double" - }, - "hasWhiteLabeling": { - "type": "boolean" - }, - "hasDebranding": { - "type": "boolean" - }, - "hasLLMSpamDetection": { - "type": "boolean" - }, - "forWhoText": { + "createdAt": { "type": "string" }, - "featureTaglines": { - "items": { - "type": "string" - }, - "type": "array" - }, - "hasAuditing": { - "type": "boolean" - }, - "hasFlexPricing": { - "type": "boolean" - }, - "enableSAML": { - "type": "boolean" - }, - "enableCanvasLTI": { - "type": "boolean" - }, - "flexPageLoadCostCents": { - "type": "number", - "format": "double" - }, - "flexPageLoadUnit": { - "type": "number", - "format": "double" - }, - "flexCommentCostCents": { - "type": "number", - "format": "double" - }, - "flexCommentUnit": { - "type": "number", - "format": "double" - }, - "flexSSOUserCostCents": { - "type": "number", - "format": "double" - }, - "flexSSOUserUnit": { - "type": "number", - "format": "double" - }, - "flexAPICreditCostCents": { - "type": "number", - "format": "double" - }, - "flexAPICreditUnit": { - "type": "number", - "format": "double" - }, - "flexSmallWidgetsCreditCostCents": { - "type": "number", - "format": "double" - }, - "flexSmallWidgetsCreditUnit": { - "type": "number", - "format": "double" - }, - "flexModeratorCostCents": { - "type": "number", - "format": "double" - }, - "flexModeratorUnit": { - "type": "number", - "format": "double" - }, - "flexAdminCostCents": { - "type": "number", - "format": "double" - }, - "flexAdminUnit": { - "type": "number", - "format": "double" - }, - "flexDomainCostCents": { - "type": "number", - "format": "double" - }, - "flexDomainUnit": { - "type": "number", - "format": "double" - }, - "flexChatGPTCostCents": { - "type": "number", - "format": "double" - }, - "flexChatGPTUnit": { - "type": "number", - "format": "double" - }, - "flexMinimumCostCents": { - "type": "number", - "format": "double" - }, - "flexManagedTenantCostCents": { - "type": "number", - "format": "double" - }, - "flexSSOAdminCostCents": { - "type": "number", - "format": "double" - }, - "flexSSOAdminUnit": { - "type": "number", - "format": "double" - }, - "flexSSOModeratorCostCents": { - "type": "number", - "format": "double" - }, - "flexSSOModeratorUnit": { - "type": "number", - "format": "double" + "state": { + "type": "integer", + "format": "int32" }, - "isSSOBillingMonthlyActiveUsers": { - "type": "boolean" + "fileCount": { + "type": "integer", + "format": "int32" } }, "required": [ "_id", - "name", - "tenantId", + "urlId", + "userId", + "managedByTenantId", + "assignedUserIds", + "subject", "createdAt", - "monthlyCostUSD", - "yearlyCostUSD", - "monthlyStripePlanId", - "yearlyStripePlanId", - "maxMonthlyPageLoads", - "maxMonthlyAPICredits", - "maxMonthlySmallWidgetsCredits", - "maxMonthlyComments", - "maxConcurrentUsers", - "maxTenantUsers", - "maxSSOUsers", - "maxModerators", - "maxDomains", - "maxWhiteLabeledTenants", - "maxMonthlyEventLogRequests", - "maxCustomCollectionSize", - "hasWhiteLabeling", - "hasDebranding", - "hasLLMSpamDetection", - "forWhoText", - "featureTaglines", - "hasAuditing", - "hasFlexPricing" + "state", + "fileCount" ], "type": "object", "additionalProperties": false }, - "GetTenantPackageResponse": { + "GetTicketsResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "tenantPackage": { - "$ref": "#/components/schemas/TenantPackage" + "tickets": { + "items": { + "$ref": "#/components/schemas/APITicket" + }, + "type": "array" } }, "required": [ "status", - "tenantPackage" + "tickets" ], "type": "object", "additionalProperties": false }, - "GetTenantPackagesResponse": { + "CreateTicketResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "tenantPackages": { - "items": { - "$ref": "#/components/schemas/TenantPackage" - }, - "type": "array" + "ticket": { + "$ref": "#/components/schemas/APITicket" } }, "required": [ "status", - "tenantPackages" + "ticket" ], "type": "object", "additionalProperties": false }, - "CreateTenantPackageResponse": { + "CreateTicketBody": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "tenantPackage": { - "$ref": "#/components/schemas/TenantPackage" + "subject": { + "type": "string" } }, "required": [ - "status", - "tenantPackage" + "subject" ], "type": "object", "additionalProperties": false }, - "CreateTenantPackageBody": { + "APITicketFile": { "properties": { - "name": { + "id": { "type": "string" }, - "monthlyCostUSD": { - "type": "number", - "format": "double", - "nullable": true - }, - "yearlyCostUSD": { - "type": "number", - "format": "double", - "nullable": true - }, - "monthlyStripePlanId": { - "type": "string", - "nullable": true - }, - "yearlyStripePlanId": { - "type": "string", - "nullable": true - }, - "maxMonthlyPageLoads": { - "type": "number", - "format": "double" - }, - "maxMonthlyAPICredits": { - "type": "number", - "format": "double" - }, - "maxMonthlySmallWidgetsCredits": { - "type": "number", - "format": "double" - }, - "maxMonthlyComments": { - "type": "number", - "format": "double" - }, - "maxConcurrentUsers": { - "type": "number", - "format": "double" + "s3Key": { + "type": "string" }, - "maxTenantUsers": { - "type": "number", - "format": "double" + "originalFileName": { + "type": "string" }, - "maxSSOUsers": { - "type": "number", - "format": "double" + "sizeBytes": { + "type": "integer", + "format": "int32" }, - "maxModerators": { - "type": "number", - "format": "double" + "contentType": { + "type": "string" }, - "maxDomains": { - "type": "number", - "format": "double" + "uploadedByUserId": { + "type": "string" }, - "maxWhiteLabeledTenants": { - "type": "number", - "format": "double" + "uploadedAt": { + "type": "string" }, - "maxMonthlyEventLogRequests": { - "type": "number", - "format": "double" + "url": { + "type": "string" }, - "maxCustomCollectionSize": { - "type": "number", - "format": "double" + "expiresAt": { + "type": "string" }, - "hasWhiteLabeling": { + "expired": { "type": "boolean" + } + }, + "required": [ + "id", + "s3Key", + "originalFileName", + "sizeBytes", + "contentType", + "uploadedByUserId", + "uploadedAt", + "url", + "expiresAt" + ], + "type": "object", + "additionalProperties": false + }, + "APITicketDetail": { + "properties": { + "_id": { + "type": "string" }, - "hasDebranding": { - "type": "boolean" + "urlId": { + "type": "string" }, - "hasLLMSpamDetection": { - "type": "boolean" + "userId": { + "type": "string" }, - "forWhoText": { + "managedByTenantId": { "type": "string" }, - "featureTaglines": { + "assignedUserIds": { "items": { "type": "string" }, "type": "array" }, - "hasAuditing": { - "type": "boolean" - }, - "hasFlexPricing": { - "type": "boolean" - }, - "enableSAML": { - "type": "boolean" - }, - "flexPageLoadCostCents": { - "type": "number", - "format": "double" - }, - "flexPageLoadUnit": { - "type": "number", - "format": "double" - }, - "flexCommentCostCents": { - "type": "number", - "format": "double" - }, - "flexCommentUnit": { - "type": "number", - "format": "double" - }, - "flexSSOUserCostCents": { - "type": "number", - "format": "double" - }, - "flexSSOUserUnit": { - "type": "number", - "format": "double" - }, - "flexAPICreditCostCents": { - "type": "number", - "format": "double" - }, - "flexAPICreditUnit": { - "type": "number", - "format": "double" - }, - "flexSmallWidgetsCreditCostCents": { - "type": "number", - "format": "double" - }, - "flexSmallWidgetsCreditUnit": { - "type": "number", - "format": "double" - }, - "flexModeratorCostCents": { - "type": "number", - "format": "double" - }, - "flexModeratorUnit": { - "type": "number", - "format": "double" - }, - "flexAdminCostCents": { - "type": "number", - "format": "double" - }, - "flexAdminUnit": { - "type": "number", - "format": "double" - }, - "flexDomainCostCents": { - "type": "number", - "format": "double" - }, - "flexDomainUnit": { - "type": "number", - "format": "double" - }, - "flexChatGPTCostCents": { - "type": "number", - "format": "double" + "subject": { + "type": "string" }, - "flexChatGPTUnit": { - "type": "number", - "format": "double" + "createdAt": { + "type": "string" }, - "flexMinimumCostCents": { - "type": "number", - "format": "double" + "state": { + "type": "integer", + "format": "int32" }, - "flexManagedTenantCostCents": { - "type": "number", - "format": "double" + "fileCount": { + "type": "integer", + "format": "int32" }, - "flexSSOAdminCostCents": { - "type": "number", - "format": "double" + "files": { + "items": { + "$ref": "#/components/schemas/APITicketFile" + }, + "type": "array" }, - "flexSSOAdminUnit": { - "type": "number", - "format": "double" + "reopenedAt": { + "type": "string", + "nullable": true }, - "flexSSOModeratorCostCents": { - "type": "number", - "format": "double" + "resolvedAt": { + "type": "string", + "nullable": true }, - "flexSSOModeratorUnit": { - "type": "number", - "format": "double" + "ackAt": { + "type": "string", + "nullable": true } }, "required": [ - "name", - "maxMonthlyPageLoads", - "maxMonthlyAPICredits", - "maxMonthlyComments", - "maxConcurrentUsers", - "maxTenantUsers", - "maxSSOUsers", - "maxModerators", - "maxDomains", - "hasDebranding", - "forWhoText", - "featureTaglines", - "hasFlexPricing" + "_id", + "urlId", + "userId", + "managedByTenantId", + "assignedUserIds", + "subject", + "createdAt", + "state", + "fileCount", + "files" ], "type": "object", "additionalProperties": false }, - "ReplaceTenantPackageBody": { + "GetTicketResponse": { "properties": { - "name": { - "type": "string" - }, - "monthlyCostUSD": { - "type": "number", - "format": "double" - }, - "yearlyCostUSD": { - "type": "number", - "format": "double" - }, - "maxMonthlyPageLoads": { - "type": "number", - "format": "double" - }, - "maxMonthlyAPICredits": { - "type": "number", - "format": "double" - }, - "maxMonthlyComments": { - "type": "number", - "format": "double" - }, - "maxConcurrentUsers": { - "type": "number", - "format": "double" + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "maxTenantUsers": { - "type": "number", - "format": "double" + "ticket": { + "$ref": "#/components/schemas/APITicketDetail" }, - "maxSSOUsers": { - "type": "number", - "format": "double" + "availableStates": { + "items": { + "type": "number", + "format": "double" + }, + "type": "array" + } + }, + "required": [ + "status", + "ticket", + "availableStates" + ], + "type": "object", + "additionalProperties": false + }, + "ChangeTicketStateResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "maxModerators": { - "type": "number", - "format": "double" + "ticket": { + "$ref": "#/components/schemas/APITicket" + } + }, + "required": [ + "status", + "ticket" + ], + "type": "object", + "additionalProperties": false + }, + "ChangeTicketStateBody": { + "properties": { + "state": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "state" + ], + "type": "object", + "additionalProperties": false + }, + "ImportedSiteType": { + "enum": [ + 0, + 1 + ], + "type": "integer" + }, + "SiteType": { + "$ref": "#/components/schemas/ImportedSiteType" + }, + "APIDomainConfiguration": { + "properties": { + "id": { + "type": "string" }, - "maxDomains": { - "type": "number", - "format": "double" + "domain": { + "type": "string" }, - "maxCustomCollectionSize": { - "type": "number", - "format": "double" + "emailFromName": { + "type": "string", + "nullable": true }, - "hasDebranding": { - "type": "boolean" + "emailFromEmail": { + "type": "string", + "nullable": true }, - "forWhoText": { - "type": "string" + "emailHeaders": { + "$ref": "#/components/schemas/Record_string.string_" }, - "featureTaglines": { - "items": { - "type": "string" - }, - "type": "array" + "wpSyncToken": { + "type": "string", + "nullable": true }, - "hasFlexPricing": { + "wpSynced": { "type": "boolean" }, - "flexPageLoadCostCents": { - "type": "number", - "format": "double" + "wpURL": { + "type": "string", + "nullable": true }, - "flexPageLoadUnit": { - "type": "number", - "format": "double" + "createdAt": { + "type": "string", + "format": "date-time" }, - "flexCommentCostCents": { - "type": "number", - "format": "double" + "autoAddedDate": { + "type": "string", + "format": "date-time" }, - "flexCommentUnit": { - "type": "number", - "format": "double" + "siteType": { + "$ref": "#/components/schemas/SiteType" }, - "flexSSOUserCostCents": { - "type": "number", - "format": "double" + "logoSrc": { + "type": "string", + "nullable": true }, - "flexSSOUserUnit": { - "type": "number", - "format": "double" + "logoSrc100px": { + "type": "string", + "nullable": true }, - "flexAPICreditCostCents": { - "type": "number", - "format": "double" + "footerUnsubscribeURL": { + "type": "string" }, - "flexAPICreditUnit": { - "type": "number", - "format": "double" + "disableUnsubscribeLinks": { + "type": "boolean" + } + }, + "required": [ + "id", + "domain", + "createdAt" + ], + "type": "object", + "additionalProperties": false + }, + "BillingInfo": { + "properties": { + "name": { + "type": "string" }, - "flexModeratorCostCents": { - "type": "number", - "format": "double" + "address": { + "type": "string" }, - "flexModeratorUnit": { - "type": "number", - "format": "double" + "city": { + "type": "string" }, - "flexAdminCostCents": { - "type": "number", - "format": "double" + "state": { + "type": "string" }, - "flexAdminUnit": { - "type": "number", - "format": "double" + "zip": { + "type": "string" }, - "flexDomainCostCents": { - "type": "number", - "format": "double" + "country": { + "type": "string" }, - "flexDomainUnit": { - "type": "number", - "format": "double" + "currency": { + "type": "string", + "nullable": true, + "description": "Currency for invoices." }, - "flexMinimumCostCents": { - "type": "number", - "format": "double" + "email": { + "type": "string", + "description": "Email for invoices." } }, "required": [ "name", - "monthlyCostUSD", - "yearlyCostUSD", - "maxMonthlyPageLoads", - "maxMonthlyAPICredits", - "maxMonthlyComments", - "maxConcurrentUsers", - "maxTenantUsers", - "maxSSOUsers", - "maxModerators", - "maxDomains", - "hasDebranding", - "forWhoText", - "featureTaglines", - "hasFlexPricing" + "address", + "city", + "state", + "zip", + "country" ], "type": "object", "additionalProperties": false }, - "UpdateTenantPackageBody": { + "APITenant": { "properties": { + "id": { + "type": "string" + }, "name": { "type": "string" }, - "monthlyCostUSD": { + "email": { + "type": "string" + }, + "signUpDate": { "type": "number", "format": "double" }, - "yearlyCostUSD": { + "packageId": { + "type": "string" + }, + "paymentFrequency": { "type": "number", "format": "double" }, - "maxMonthlyPageLoads": { - "type": "number", - "format": "double" - }, - "maxMonthlyAPICredits": { - "type": "number", - "format": "double" - }, - "maxMonthlyComments": { - "type": "number", - "format": "double" - }, - "maxConcurrentUsers": { - "type": "number", - "format": "double" - }, - "maxTenantUsers": { - "type": "number", - "format": "double" - }, - "maxSSOUsers": { - "type": "number", - "format": "double" - }, - "maxModerators": { - "type": "number", - "format": "double" - }, - "maxDomains": { - "type": "number", - "format": "double" - }, - "maxCustomCollectionSize": { - "type": "number", - "format": "double" - }, - "hasDebranding": { + "billingInfoValid": { "type": "boolean" }, - "hasWhiteLabeling": { + "billingHandledExternally": { "type": "boolean" }, - "forWhoText": { + "createdBy": { "type": "string" }, - "featureTaglines": { + "isSetup": { + "type": "boolean" + }, + "domainConfiguration": { "items": { - "type": "string" + "$ref": "#/components/schemas/APIDomainConfiguration" }, "type": "array" }, - "hasFlexPricing": { - "type": "boolean" - }, - "flexPageLoadCostCents": { - "type": "number", - "format": "double" - }, - "flexPageLoadUnit": { - "type": "number", - "format": "double" - }, - "flexCommentCostCents": { - "type": "number", - "format": "double" - }, - "flexCommentUnit": { - "type": "number", - "format": "double" - }, - "flexSSOUserCostCents": { - "type": "number", - "format": "double" - }, - "flexSSOUserUnit": { - "type": "number", - "format": "double" - }, - "flexAPICreditCostCents": { - "type": "number", - "format": "double" - }, - "flexAPICreditUnit": { - "type": "number", - "format": "double" - }, - "flexModeratorCostCents": { - "type": "number", - "format": "double" - }, - "flexModeratorUnit": { - "type": "number", - "format": "double" - }, - "flexAdminCostCents": { - "type": "number", - "format": "double" - }, - "flexAdminUnit": { - "type": "number", - "format": "double" - }, - "flexDomainCostCents": { - "type": "number", - "format": "double" - }, - "flexDomainUnit": { - "type": "number", - "format": "double" + "billingInfo": { + "$ref": "#/components/schemas/BillingInfo" }, - "flexMinimumCostCents": { - "type": "number", - "format": "double" - } - }, - "type": "object", - "additionalProperties": false - }, - "APITenantDailyUsage": { - "properties": { - "id": { + "stripeCustomerId": { "type": "string" }, - "tenantId": { + "stripeSubscriptionId": { "type": "string" }, - "yearNumber": { - "type": "number", - "format": "double" + "stripePlanId": { + "type": "string" }, - "monthNumber": { - "type": "number", - "format": "double" + "enableProfanityFilter": { + "type": "boolean" }, - "dayNumber": { - "type": "number", - "format": "double" + "enableSpamFilter": { + "type": "boolean" }, - "commentFetchCount": { - "type": "number", - "format": "double" + "lastBillingIssueReminderDate": { + "type": "string", + "format": "date-time" }, - "commentCreateCount": { - "type": "number", - "format": "double" + "removeUnverifiedComments": { + "type": "boolean" }, - "conversationCreateCount": { + "unverifiedCommentsTTLms": { "type": "number", - "format": "double" + "format": "double", + "nullable": true }, - "voteCount": { - "type": "number", - "format": "double" + "commentsRequireApproval": { + "type": "boolean" }, - "accountCreatedCount": { - "type": "number", - "format": "double" + "autoApproveCommentOnVerification": { + "type": "boolean" }, - "userMentionSearch": { - "type": "number", - "format": "double" + "sendProfaneToSpam": { + "type": "boolean" }, - "hashTagSearch": { - "type": "number", - "format": "double" + "hasFlexPricing": { + "type": "boolean" }, - "gifSearchTrending": { - "type": "number", - "format": "double" + "hasAuditing": { + "type": "boolean" }, - "gifSearch": { + "flexLastBilledAmount": { "type": "number", "format": "double" }, - "apiCreditsUsed": { + "deAnonIpAddr": { "type": "number", "format": "double" }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "billed": { - "type": "boolean" - }, - "ignored": { - "type": "boolean" - }, - "apiErrorCount": { - "type": "number", - "format": "double" + "meta": { + "$ref": "#/components/schemas/Record_string.string_" } }, "required": [ "id", - "tenantId", - "yearNumber", - "monthNumber", - "dayNumber", - "commentFetchCount", - "commentCreateCount", - "conversationCreateCount", - "voteCount", - "accountCreatedCount", - "userMentionSearch", - "hashTagSearch", - "gifSearchTrending", - "gifSearch", - "apiCreditsUsed", - "createdAt", - "billed", - "ignored", - "apiErrorCount" + "name", + "signUpDate", + "packageId", + "paymentFrequency", + "billingInfoValid", + "createdBy", + "isSetup", + "domainConfiguration", + "enableProfanityFilter", + "enableSpamFilter" ], "type": "object", "additionalProperties": false }, - "GetTenantDailyUsagesResponse": { + "GetTenantResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "tenantDailyUsages": { - "items": { - "$ref": "#/components/schemas/APITenantDailyUsage" - }, - "type": "array" + "tenant": { + "$ref": "#/components/schemas/APITenant" } }, "required": [ "status", - "tenantDailyUsages" + "tenant" ], "type": "object", "additionalProperties": false }, - "MetaItem": { + "GetTenantsResponse": { "properties": { - "name": { - "type": "string" + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "values": { + "tenants": { "items": { - "type": "string" + "$ref": "#/components/schemas/APITenant" }, "type": "array" } }, "required": [ - "name", - "values" + "status", + "tenants" ], "type": "object", "additionalProperties": false }, - "QuestionResult": { + "CreateTenantResponse": { "properties": { - "_id": { - "type": "string" - }, - "tenantId": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "tenant": { + "$ref": "#/components/schemas/APITenant" + } + }, + "required": [ + "status", + "tenant" + ], + "type": "object", + "additionalProperties": false + }, + "CreateTenantBody": { + "properties": { + "name": { "type": "string" }, - "urlId": { + "domainConfiguration": { + "items": { + "$ref": "#/components/schemas/APIDomainConfiguration" + }, + "type": "array" + }, + "email": { "type": "string" }, - "anonUserId": { + "signUpDate": { + "type": "number", + "format": "double" + }, + "packageId": { "type": "string" }, - "userId": { + "paymentFrequency": { + "type": "number", + "format": "double" + }, + "billingInfoValid": { + "type": "boolean" + }, + "billingHandledExternally": { + "type": "boolean" + }, + "createdBy": { "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time" + "isSetup": { + "type": "boolean" }, - "value": { - "type": "integer", - "format": "int32" + "billingInfo": { + "$ref": "#/components/schemas/BillingInfo" }, - "commentId": { - "type": "string", - "nullable": true + "stripeCustomerId": { + "type": "string" }, - "questionId": { + "stripeSubscriptionId": { + "type": "string" + }, + "stripePlanId": { "type": "string" }, + "enableProfanityFilter": { + "type": "boolean" + }, + "enableSpamFilter": { + "type": "boolean" + }, + "removeUnverifiedComments": { + "type": "boolean" + }, + "unverifiedCommentsTTLms": { + "type": "number", + "format": "double" + }, + "commentsRequireApproval": { + "type": "boolean" + }, + "autoApproveCommentOnVerification": { + "type": "boolean" + }, + "sendProfaneToSpam": { + "type": "boolean" + }, + "deAnonIpAddr": { + "type": "number", + "format": "double" + }, "meta": { + "$ref": "#/components/schemas/Record_string.string_" + } + }, + "required": [ + "name", + "domainConfiguration" + ], + "type": "object", + "additionalProperties": false + }, + "UpdateTenantBody": { + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "signUpDate": { + "type": "number", + "format": "double" + }, + "packageId": { + "type": "string" + }, + "paymentFrequency": { + "type": "number", + "format": "double" + }, + "billingInfoValid": { + "type": "boolean" + }, + "billingHandledExternally": { + "type": "boolean" + }, + "createdBy": { + "type": "string" + }, + "isSetup": { + "type": "boolean" + }, + "domainConfiguration": { "items": { - "$ref": "#/components/schemas/MetaItem" + "$ref": "#/components/schemas/APIDomainConfiguration" }, - "type": "array", - "nullable": true + "type": "array" }, - "ipHash": { + "billingInfo": { + "$ref": "#/components/schemas/BillingInfo" + }, + "stripeCustomerId": { + "type": "string" + }, + "stripeSubscriptionId": { + "type": "string" + }, + "stripePlanId": { + "type": "string" + }, + "enableProfanityFilter": { + "type": "boolean" + }, + "enableSpamFilter": { + "type": "boolean" + }, + "removeUnverifiedComments": { + "type": "boolean" + }, + "unverifiedCommentsTTLms": { + "type": "number", + "format": "double" + }, + "commentsRequireApproval": { + "type": "boolean" + }, + "autoApproveCommentOnVerification": { + "type": "boolean" + }, + "sendProfaneToSpam": { + "type": "boolean" + }, + "deAnonIpAddr": { + "type": "number", + "format": "double" + }, + "meta": { + "$ref": "#/components/schemas/Record_string.string_" + }, + "managedByTenantId": { "type": "string" } }, - "required": [ - "_id", - "tenantId", - "urlId", - "anonUserId", - "userId", - "createdAt", - "value", - "questionId", - "ipHash" - ], "type": "object", "additionalProperties": false }, - "GetQuestionResultResponse": { + "GetTenantUserResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "questionResult": { - "$ref": "#/components/schemas/QuestionResult" + "tenantUser": { + "$ref": "#/components/schemas/User" } }, "required": [ "status", - "questionResult" + "tenantUser" ], "type": "object", "additionalProperties": false }, - "GetQuestionResultsResponse": { + "GetTenantUsersResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "questionResults": { + "tenantUsers": { "items": { - "$ref": "#/components/schemas/QuestionResult" + "$ref": "#/components/schemas/User" }, "type": "array" } }, "required": [ "status", - "questionResults" + "tenantUsers" ], "type": "object", "additionalProperties": false }, - "CreateQuestionResultResponse": { + "CreateTenantUserResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "questionResult": { - "$ref": "#/components/schemas/QuestionResult" + "tenantUser": { + "$ref": "#/components/schemas/User" } }, "required": [ "status", - "questionResult" + "tenantUser" ], "type": "object", "additionalProperties": false }, - "CreateQuestionResultBody": { + "CreateTenantUserBody": { "properties": { - "urlId": { + "username": { "type": "string" }, - "value": { - "type": "number", - "format": "double" - }, - "questionId": { + "email": { "type": "string" }, - "anonUserId": { + "displayName": { "type": "string" }, - "userId": { + "websiteUrl": { "type": "string" }, - "commentId": { - "type": "string" + "signUpDate": { + "type": "number", + "format": "double" }, - "meta": { - "items": { - "$ref": "#/components/schemas/MetaItem" - }, - "type": "array", - "nullable": true - } - }, - "required": [ - "urlId", - "value", - "questionId" - ], - "type": "object", - "additionalProperties": {} - }, - "UpdateQuestionResultBody": { - "properties": { - "urlId": { + "locale": { "type": "string" }, - "anonUserId": { - "type": "string" - }, - "userId": { - "type": "string" + "verified": { + "type": "boolean" }, - "value": { + "loginCount": { "type": "number", "format": "double" }, - "commentId": { - "type": "string" + "optedInNotifications": { + "type": "boolean" }, - "questionId": { + "optedInTenantNotifications": { + "type": "boolean" + }, + "hideAccountCode": { + "type": "boolean" + }, + "avatarSrc": { "type": "string" }, - "meta": { + "isHelpRequestAdmin": { + "type": "boolean" + }, + "isAccountOwner": { + "type": "boolean" + }, + "isAdminAdmin": { + "type": "boolean" + }, + "isBillingAdmin": { + "type": "boolean" + }, + "isAnalyticsAdmin": { + "type": "boolean" + }, + "isCustomizationAdmin": { + "type": "boolean" + }, + "isManageDataAdmin": { + "type": "boolean" + }, + "isCommentModeratorAdmin": { + "type": "boolean" + }, + "isAPIAdmin": { + "type": "boolean" + }, + "moderatorIds": { "items": { - "$ref": "#/components/schemas/MetaItem" + "type": "string" }, - "type": "array", - "nullable": true - } - }, - "type": "object", - "additionalProperties": {} - }, - "Record_number.number_": { - "properties": {}, - "additionalProperties": { - "type": "number", - "format": "double" - }, - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, - "QuestionDatum": { - "properties": { - "v": { - "$ref": "#/components/schemas/Record_number.number_" + "type": "array" }, - "total": { - "type": "integer", - "format": "int64" + "digestEmailFrequency": { + "type": "number", + "format": "double" + }, + "displayLabel": { + "type": "string" } }, "required": [ - "v", - "total" + "username", + "email" ], "type": "object", "additionalProperties": false }, - "Record_string.QuestionDatum_": { - "properties": {}, - "additionalProperties": { - "$ref": "#/components/schemas/QuestionDatum" - }, - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, - "QuestionResultAggregationOverall": { + "ReplaceTenantUserBody": { "properties": { - "dataByDateBucket": { - "$ref": "#/components/schemas/Record_string.QuestionDatum_" + "username": { + "type": "string" }, - "dataByUrlId": { - "$ref": "#/components/schemas/Record_string.QuestionDatum_" + "email": { + "type": "string" }, - "countsByValue": { - "$ref": "#/components/schemas/Int32Map" + "displayName": { + "type": "string" }, - "total": { - "type": "integer", - "format": "int64" + "websiteUrl": { + "type": "string" }, - "average": { + "signUpDate": { "type": "number", "format": "double" }, - "createdAt": { - "type": "string", - "format": "date-time" - } - }, - "required": [ - "total", - "createdAt" - ], - "type": "object", - "additionalProperties": false - }, - "AggregateQuestionResultsResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "locale": { + "type": "string" }, - "data": { - "$ref": "#/components/schemas/QuestionResultAggregationOverall" - } - }, - "required": [ - "status", - "data" - ], - "type": "object", - "additionalProperties": false - }, - "AggregateTimeBucket": { - "type": "string", - "enum": [ - "day", - "month", - "year" - ] - }, - "Record_string.QuestionResultAggregationOverall_": { - "properties": {}, - "additionalProperties": { - "$ref": "#/components/schemas/QuestionResultAggregationOverall" - }, - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, - "BulkAggregateQuestionResultsResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "verified": { + "type": "boolean" }, - "data": { - "$ref": "#/components/schemas/Record_string.QuestionResultAggregationOverall_" - } - }, - "required": [ - "status", - "data" - ], - "type": "object", - "additionalProperties": false - }, - "BulkAggregateQuestionItem": { - "properties": { - "aggId": { - "type": "string" + "loginCount": { + "type": "number", + "format": "double" }, - "questionId": { + "optedInNotifications": { + "type": "boolean" + }, + "optedInTenantNotifications": { + "type": "boolean" + }, + "hideAccountCode": { + "type": "boolean" + }, + "avatarSrc": { "type": "string" }, - "questionIds": { + "isHelpRequestAdmin": { + "type": "boolean" + }, + "isAccountOwner": { + "type": "boolean" + }, + "isAdminAdmin": { + "type": "boolean" + }, + "isBillingAdmin": { + "type": "boolean" + }, + "isAnalyticsAdmin": { + "type": "boolean" + }, + "isCustomizationAdmin": { + "type": "boolean" + }, + "isManageDataAdmin": { + "type": "boolean" + }, + "isCommentModeratorAdmin": { + "type": "boolean" + }, + "isAPIAdmin": { + "type": "boolean" + }, + "moderatorIds": { "items": { "type": "string" }, "type": "array" }, - "urlId": { + "digestEmailFrequency": { + "type": "number", + "format": "double" + }, + "displayLabel": { "type": "string" }, - "timeBucket": { - "$ref": "#/components/schemas/AggregateTimeBucket" + "createdFromUrlId": { + "type": "string" }, - "startDate": { - "type": "string", - "format": "date-time" + "createdFromTenantId": { + "type": "string" + }, + "lastLoginDate": { + "type": "number", + "format": "double" + }, + "karma": { + "type": "number", + "format": "double" } }, "required": [ - "aggId" + "username", + "email" ], "type": "object", "additionalProperties": false }, - "BulkAggregateQuestionResultsRequest": { + "UpdateTenantUserBody": { "properties": { - "aggregations": { - "items": { - "$ref": "#/components/schemas/BulkAggregateQuestionItem" - }, - "type": "array" - } - }, - "required": [ - "aggregations" - ], - "type": "object", - "additionalProperties": false - }, - "CommentLogType": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55 - ], - "type": "integer" - }, - "RepeatCommentHandlingAction": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer" - }, - "RepeatCommentCheckIgnoredReason": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "type": "integer" - }, - "CommentLogData": { - "properties": { - "clearContent": { - "type": "boolean" - }, - "isDeletedUser": { - "type": "boolean" - }, - "phrase": { + "username": { "type": "string" }, - "badWord": { + "displayName": { "type": "string" }, - "word": { + "websiteUrl": { "type": "string" }, - "locale": { + "email": { "type": "string" }, - "tenantBadgeId": { - "type": "string" + "signUpDate": { + "type": "number", + "format": "double" }, - "badgeId": { - "type": "string" + "verified": { + "type": "boolean" }, - "wasLoggedIn": { + "loginCount": { + "type": "number", + "format": "double" + }, + "optedInNotifications": { "type": "boolean" }, - "foundUser": { + "optedInTenantNotifications": { "type": "boolean" }, - "verified": { + "hideAccountCode": { "type": "boolean" }, - "engine": { + "avatarSrc": { "type": "string" }, - "engineResponse": { + "isHelpRequestAdmin": { + "type": "boolean" + }, + "isAccountOwner": { + "type": "boolean" + }, + "isAdminAdmin": { + "type": "boolean" + }, + "isBillingAdmin": { + "type": "boolean" + }, + "isAnalyticsAdmin": { + "type": "boolean" + }, + "isCustomizationAdmin": { + "type": "boolean" + }, + "isManageDataAdmin": { + "type": "boolean" + }, + "isCommentModeratorAdmin": { + "type": "boolean" + }, + "isAPIAdmin": { + "type": "boolean" + }, + "moderatorIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "locale": { "type": "string" }, - "engineTokens": { + "digestEmailFrequency": { "type": "number", "format": "double" }, - "trustFactor": { - "type": "number", - "format": "double" + "displayLabel": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "TenantPackage": { + "properties": { + "_id": { + "type": "string" }, - "rule": { - "$ref": "#/components/schemas/SpamRule" + "name": { + "type": "string" }, - "userId": { + "tenantId": { "type": "string" }, - "subscribers": { - "type": "number", - "format": "double" + "createdAt": { + "type": "string", + "format": "date-time" }, - "notificationCount": { - "type": "number", - "format": "double" + "templateId": { + "type": "string" }, - "votesBefore": { + "monthlyCostUSD": { "type": "number", "format": "double", "nullable": true }, - "votesUpBefore": { + "yearlyCostUSD": { "type": "number", "format": "double", "nullable": true }, - "votesDownBefore": { - "type": "number", - "format": "double", + "monthlyStripePlanId": { + "type": "string", "nullable": true }, - "votesAfter": { - "type": "number", - "format": "double", + "yearlyStripePlanId": { + "type": "string", "nullable": true }, - "votesUpAfter": { + "maxMonthlyPageLoads": { "type": "number", - "format": "double", - "nullable": true + "format": "double" }, - "votesDownAfter": { + "maxMonthlyAPICredits": { "type": "number", - "format": "double", - "nullable": true + "format": "double" }, - "repeatAction": { - "$ref": "#/components/schemas/RepeatCommentHandlingAction" + "maxMonthlySmallWidgetsCredits": { + "type": "number", + "format": "double" }, - "reason": { - "$ref": "#/components/schemas/RepeatCommentCheckIgnoredReason" + "maxMonthlyComments": { + "type": "number", + "format": "double" }, - "otherData": {}, - "spamBefore": { - "type": "boolean" + "maxConcurrentUsers": { + "type": "number", + "format": "double" }, - "spamAfter": { - "type": "boolean" + "maxTenantUsers": { + "type": "number", + "format": "double" }, - "permanentFlag": { - "type": "string", - "enum": [ - "permanent" - ], - "nullable": false + "maxSSOUsers": { + "type": "number", + "format": "double" }, - "approvedBefore": { - "type": "boolean" + "maxModerators": { + "type": "number", + "format": "double" }, - "approvedAfter": { - "type": "boolean" + "maxDomains": { + "type": "number", + "format": "double" }, - "reviewedBefore": { - "type": "boolean" - }, - "reviewedAfter": { - "type": "boolean" - }, - "textBefore": { - "type": "string" - }, - "textAfter": { - "type": "string" - }, - "expireBefore": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "expireAfter": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "flagCountBefore": { + "maxWhiteLabeledTenants": { "type": "number", - "format": "double", - "nullable": true + "format": "double" }, - "trustFactorBefore": { + "maxMonthlyEventLogRequests": { "type": "number", "format": "double" }, - "trustFactorAfter": { + "maxCustomCollectionSize": { "type": "number", "format": "double" }, - "referencedCommentId": { - "type": "string" - }, - "invalidLocale": { - "type": "string" - }, - "detectedLocale": { - "type": "string" + "hasWhiteLabeling": { + "type": "boolean" }, - "detectedLanguage": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "CommentLogEntry": { - "properties": { - "d": { - "type": "string", - "format": "date-time" + "hasDebranding": { + "type": "boolean" }, - "t": { - "$ref": "#/components/schemas/CommentLogType" + "hasLLMSpamDetection": { + "type": "boolean" }, - "da": { - "$ref": "#/components/schemas/CommentLogData" - } - }, - "required": [ - "d", - "t" - ], - "type": "object", - "additionalProperties": false - }, - "FComment": { - "properties": { - "_id": { + "forWhoText": { "type": "string" }, - "tenantId": { - "type": "string" + "featureTaglines": { + "items": { + "type": "string" + }, + "type": "array" }, - "urlId": { - "type": "string" + "hasAuditing": { + "type": "boolean" }, - "urlIdRaw": { - "type": "string" + "hasFlexPricing": { + "type": "boolean" }, - "url": { - "type": "string" + "enableSAML": { + "type": "boolean" }, - "pageTitle": { - "type": "string", - "nullable": true + "enableCanvasLTI": { + "type": "boolean" }, - "userId": { - "allOf": [ - { - "$ref": "#/components/schemas/UserId" - } - ], - "nullable": true + "flexPageLoadCostCents": { + "type": "number", + "format": "double" }, - "anonUserId": { - "type": "string", - "nullable": true + "flexPageLoadUnit": { + "type": "number", + "format": "double" }, - "commenterEmail": { - "type": "string", - "nullable": true + "flexCommentCostCents": { + "type": "number", + "format": "double" }, - "commenterName": { - "type": "string" + "flexCommentUnit": { + "type": "number", + "format": "double" }, - "commenterLink": { - "type": "string", - "nullable": true + "flexSSOUserCostCents": { + "type": "number", + "format": "double" }, - "comment": { - "type": "string" + "flexSSOUserUnit": { + "type": "number", + "format": "double" }, - "commentHTML": { - "type": "string" + "flexAPICreditCostCents": { + "type": "number", + "format": "double" }, - "parentId": { - "type": "string", - "nullable": true + "flexAPICreditUnit": { + "type": "number", + "format": "double" }, - "date": { - "type": "string", - "format": "date-time", - "nullable": true + "flexSmallWidgetsCreditCostCents": { + "type": "number", + "format": "double" }, - "localDateString": { - "type": "string", - "nullable": true + "flexSmallWidgetsCreditUnit": { + "type": "number", + "format": "double" }, - "localDateHours": { - "type": "integer", - "format": "int32", - "nullable": true + "flexModeratorCostCents": { + "type": "number", + "format": "double" }, - "votes": { - "type": "integer", - "format": "int32", - "nullable": true + "flexModeratorUnit": { + "type": "number", + "format": "double" }, - "votesUp": { - "type": "integer", - "format": "int32", - "nullable": true + "flexAdminCostCents": { + "type": "number", + "format": "double" }, - "votesDown": { - "type": "integer", - "format": "int32", - "nullable": true + "flexAdminUnit": { + "type": "number", + "format": "double" }, - "expireAt": { - "type": "string", - "format": "date-time", - "nullable": true + "flexDomainCostCents": { + "type": "number", + "format": "double" }, - "verified": { - "type": "boolean" + "flexDomainUnit": { + "type": "number", + "format": "double" }, - "verifiedDate": { - "type": "string", - "format": "date-time", - "nullable": true + "flexChatGPTCostCents": { + "type": "number", + "format": "double" }, - "verificationId": { - "type": "string", - "nullable": true + "flexChatGPTUnit": { + "type": "number", + "format": "double" }, - "notificationSentForParent": { - "type": "boolean" + "flexLLMCostCents": { + "type": "number", + "format": "double" }, - "notificationSentForParentTenant": { - "type": "boolean" + "flexLLMUnit": { + "type": "number", + "format": "double" }, - "reviewed": { - "type": "boolean" + "flexMinimumCostCents": { + "type": "number", + "format": "double" }, - "imported": { - "type": "boolean" + "flexManagedTenantCostCents": { + "type": "number", + "format": "double" }, - "externalId": { - "type": "string" + "flexSSOAdminCostCents": { + "type": "number", + "format": "double" }, - "externalParentId": { - "type": "string", - "nullable": true + "flexSSOAdminUnit": { + "type": "number", + "format": "double" }, - "avatarSrc": { - "type": "string", - "nullable": true + "flexSSOModeratorCostCents": { + "type": "number", + "format": "double" }, - "isSpam": { - "type": "boolean" + "flexSSOModeratorUnit": { + "type": "number", + "format": "double" }, - "permNotSpam": { + "isSSOBillingMonthlyActiveUsers": { "type": "boolean" }, - "aiDeterminedSpam": { + "hasAIAgents": { "type": "boolean" }, - "hasImages": { - "type": "boolean" - }, - "pageNumber": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "pageNumberOF": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "pageNumberNF": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "hasLinks": { - "type": "boolean" - }, - "hasCode": { - "type": "boolean" - }, - "approved": { - "type": "boolean" - }, - "locale": { - "type": "string", - "nullable": true - }, - "isDeleted": { - "type": "boolean" - }, - "isDeletedUser": { - "type": "boolean" - }, - "isBannedUser": { - "type": "boolean" - }, - "isByAdmin": { - "type": "boolean" - }, - "isByModerator": { - "type": "boolean" - }, - "isPinned": { - "type": "boolean", - "nullable": true - }, - "isLocked": { - "type": "boolean", - "nullable": true - }, - "flagCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "rating": { + "maxAIAgents": { "type": "number", - "format": "double", - "nullable": true - }, - "displayLabel": { - "type": "string", - "nullable": true - }, - "fromProductId": { - "type": "integer", - "format": "int32" - }, - "meta": { - "properties": { - "wpId": { - "type": "string" - }, - "wpUserId": { - "type": "string" - }, - "wpPostId": { - "type": "string" - } - }, - "additionalProperties": {}, - "type": "object", - "nullable": true - }, - "ipHash": { - "type": "string" - }, - "mentions": { - "items": { - "$ref": "#/components/schemas/CommentUserMentionInfo" - }, - "type": "array" - }, - "hashTags": { - "items": { - "$ref": "#/components/schemas/CommentUserHashTagInfo" - }, - "type": "array" - }, - "badges": { - "items": { - "$ref": "#/components/schemas/CommentUserBadgeInfo" - }, - "type": "array", - "nullable": true - }, - "domain": { - "allOf": [ - { - "$ref": "#/components/schemas/FDomain" - } - ], - "nullable": true - }, - "veteranBadgeProcessed": { - "type": "string" - }, - "moderationGroupIds": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "didProcessBadges": { - "type": "boolean" - }, - "fromOfflineRestore": { - "type": "boolean" - }, - "autoplayJobId": { - "type": "string" - }, - "autoplayDelayMS": { - "type": "integer", - "format": "int64" - }, - "feedbackIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "logs": { - "items": { - "$ref": "#/components/schemas/CommentLogEntry" - }, - "type": "array", - "nullable": true - }, - "groupIds": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "viewCount": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "requiresVerification": { - "type": "boolean" + "format": "double" }, - "editKey": { - "type": "string" + "aiAgentDailyBudgetCents": { + "type": "number", + "format": "double" }, - "tosAcceptedAt": { - "type": "string", - "format": "date-time" + "aiAgentMonthlyBudgetCents": { + "type": "number", + "format": "double" } }, "required": [ "_id", + "name", "tenantId", - "urlId", - "url", - "commenterName", - "comment", - "commentHTML", - "date", - "verified", - "approved", - "locale" + "createdAt", + "monthlyCostUSD", + "yearlyCostUSD", + "monthlyStripePlanId", + "yearlyStripePlanId", + "maxMonthlyPageLoads", + "maxMonthlyAPICredits", + "maxMonthlySmallWidgetsCredits", + "maxMonthlyComments", + "maxConcurrentUsers", + "maxTenantUsers", + "maxSSOUsers", + "maxModerators", + "maxDomains", + "maxWhiteLabeledTenants", + "maxMonthlyEventLogRequests", + "maxCustomCollectionSize", + "hasWhiteLabeling", + "hasDebranding", + "hasLLMSpamDetection", + "forWhoText", + "featureTaglines", + "hasAuditing", + "hasFlexPricing" ], "type": "object", "additionalProperties": false }, - "FindCommentsByRangeItem": { + "GetTenantPackageResponse": { "properties": { - "comment": { - "allOf": [ - { - "$ref": "#/components/schemas/FComment" - } - ], - "nullable": true + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "result": { - "$ref": "#/components/schemas/QuestionResult" + "tenantPackage": { + "$ref": "#/components/schemas/TenantPackage" } }, "required": [ - "comment", - "result" + "status", + "tenantPackage" ], "type": "object", "additionalProperties": false }, - "FindCommentsByRangeResponse": { + "GetTenantPackagesResponse": { "properties": { - "results": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "tenantPackages": { "items": { - "$ref": "#/components/schemas/FindCommentsByRangeItem" + "$ref": "#/components/schemas/TenantPackage" }, "type": "array" - }, - "createdAt": { - "type": "string", - "format": "date-time" } }, "required": [ - "results", - "createdAt" + "status", + "tenantPackages" ], "type": "object", "additionalProperties": false }, - "CombineQuestionResultsWithCommentsResponse": { + "CreateTenantPackageResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "data": { - "$ref": "#/components/schemas/FindCommentsByRangeResponse" + "tenantPackage": { + "$ref": "#/components/schemas/TenantPackage" } }, "required": [ "status", - "data" + "tenantPackage" ], "type": "object", "additionalProperties": false }, - "QuestionConfig": { + "CreateTenantPackageBody": { "properties": { - "_id": { - "type": "string" - }, - "tenantId": { - "type": "string" - }, "name": { "type": "string" }, - "question": { - "type": "string" - }, - "summaryLabel": { - "type": "string" + "monthlyCostUSD": { + "type": "number", + "format": "double", + "nullable": true }, - "helpText": { - "type": "string" + "yearlyCostUSD": { + "type": "number", + "format": "double", + "nullable": true }, - "createdAt": { + "monthlyStripePlanId": { "type": "string", - "format": "date-time" + "nullable": true }, - "createdBy": { - "type": "string" + "yearlyStripePlanId": { + "type": "string", + "nullable": true }, - "usedCount": { + "maxMonthlyPageLoads": { "type": "number", "format": "double" }, - "lastUsed": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "numStars": { + "maxMonthlyAPICredits": { "type": "number", "format": "double" }, - "min": { + "maxMonthlySmallWidgetsCredits": { "type": "number", "format": "double" }, - "max": { + "maxMonthlyComments": { "type": "number", "format": "double" }, - "defaultValue": { + "maxConcurrentUsers": { "type": "number", "format": "double" }, - "labelNegative": { - "type": "string" - }, - "labelPositive": { - "type": "string" - }, - "customOptions": { - "items": { - "properties": { - "imageSrc": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "imageSrc", - "name" - ], - "type": "object" - }, - "type": "array" - }, - "subQuestionIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "alwaysShowSubQuestions": { - "type": "boolean" - }, - "reportingOrder": { + "maxTenantUsers": { "type": "number", "format": "double" - } - }, - "required": [ - "_id", - "tenantId", - "name", - "question", - "helpText", - "createdAt", - "createdBy", - "usedCount", - "lastUsed", - "type", - "numStars", - "min", - "max", - "defaultValue", - "labelNegative", - "labelPositive", - "customOptions", - "subQuestionIds", - "alwaysShowSubQuestions", - "reportingOrder" - ], - "type": "object", - "additionalProperties": false - }, - "GetQuestionConfigResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "questionConfig": { - "$ref": "#/components/schemas/QuestionConfig" - } - }, - "required": [ - "status", - "questionConfig" - ], - "type": "object", - "additionalProperties": false - }, - "GetQuestionConfigsResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "questionConfigs": { - "items": { - "$ref": "#/components/schemas/QuestionConfig" - }, - "type": "array" - } - }, - "required": [ - "status", - "questionConfigs" - ], - "type": "object", - "additionalProperties": false - }, - "CreateQuestionConfigResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "questionConfig": { - "$ref": "#/components/schemas/QuestionConfig" - } - }, - "required": [ - "status", - "questionConfig" - ], - "type": "object", - "additionalProperties": false - }, - "CreateQuestionConfigBody": { - "properties": { - "name": { - "type": "string" - }, - "question": { - "type": "string" }, - "helpText": { - "type": "string" + "maxSSOUsers": { + "type": "number", + "format": "double" }, - "type": { - "type": "string" + "maxModerators": { + "type": "number", + "format": "double" }, - "numStars": { + "maxDomains": { "type": "number", "format": "double" }, - "min": { + "maxWhiteLabeledTenants": { "type": "number", "format": "double" }, - "max": { + "maxMonthlyEventLogRequests": { "type": "number", "format": "double" }, - "defaultValue": { + "maxCustomCollectionSize": { "type": "number", "format": "double" }, - "labelNegative": { - "type": "string" + "hasWhiteLabeling": { + "type": "boolean" }, - "labelPositive": { - "type": "string" + "hasDebranding": { + "type": "boolean" }, - "customOptions": { - "items": { - "properties": { - "imageSrc": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "imageSrc", - "name" - ], - "type": "object" - }, - "type": "array" + "hasLLMSpamDetection": { + "type": "boolean" }, - "subQuestionIds": { + "forWhoText": { + "type": "string" + }, + "featureTaglines": { "items": { "type": "string" }, "type": "array" }, - "alwaysShowSubQuestions": { + "hasAuditing": { "type": "boolean" }, - "reportingOrder": { - "type": "number", - "format": "double" - } - }, - "required": [ - "name", - "question", - "type", - "reportingOrder" - ], - "type": "object", - "additionalProperties": {} - }, - "UpdateQuestionConfigBody": { - "properties": { - "name": { - "type": "string" - }, - "question": { - "type": "string" - }, - "helpText": { - "type": "string" + "hasFlexPricing": { + "type": "boolean" }, - "type": { - "type": "string" + "enableSAML": { + "type": "boolean" }, - "numStars": { + "flexPageLoadCostCents": { "type": "number", "format": "double" }, - "min": { + "flexPageLoadUnit": { "type": "number", "format": "double" }, - "max": { + "flexCommentCostCents": { "type": "number", "format": "double" }, - "defaultValue": { + "flexCommentUnit": { "type": "number", "format": "double" }, - "labelNegative": { - "type": "string" + "flexSSOUserCostCents": { + "type": "number", + "format": "double" }, - "labelPositive": { - "type": "string" + "flexSSOUserUnit": { + "type": "number", + "format": "double" }, - "customOptions": { - "items": { - "properties": { - "imageSrc": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "imageSrc", - "name" - ], - "type": "object" - }, - "type": "array" + "flexAPICreditCostCents": { + "type": "number", + "format": "double" }, - "subQuestionIds": { - "items": { - "type": "string" - }, - "type": "array" + "flexAPICreditUnit": { + "type": "number", + "format": "double" }, - "alwaysShowSubQuestions": { - "type": "boolean" + "flexSmallWidgetsCreditCostCents": { + "type": "number", + "format": "double" }, - "reportingOrder": { + "flexSmallWidgetsCreditUnit": { "type": "number", "format": "double" - } - }, - "type": "object", - "additionalProperties": {} - }, - "PendingCommentToSyncOutbound": { - "properties": { - "_id": { - "type": "string" }, - "commentId": { - "type": "string" + "flexModeratorCostCents": { + "type": "number", + "format": "double" }, - "comment": { - "$ref": "#/components/schemas/FComment" + "flexModeratorUnit": { + "type": "number", + "format": "double" }, - "externalId": { - "type": "string", - "nullable": true + "flexAdminCostCents": { + "type": "number", + "format": "double" }, - "createdAt": { - "type": "string", - "format": "date-time" + "flexAdminUnit": { + "type": "number", + "format": "double" }, - "tenantId": { - "type": "string" + "flexDomainCostCents": { + "type": "number", + "format": "double" }, - "attemptCount": { + "flexDomainUnit": { "type": "number", "format": "double" }, - "nextAttemptAt": { - "type": "string", - "format": "date-time" + "flexLLMCostCents": { + "type": "number", + "format": "double" }, - "eventType": { + "flexLLMUnit": { "type": "number", "format": "double" }, - "type": { + "flexMinimumCostCents": { "type": "number", "format": "double" }, - "domain": { - "type": "string" + "flexManagedTenantCostCents": { + "type": "number", + "format": "double" }, - "lastError": { - "additionalProperties": false, - "type": "object" + "flexSSOAdminCostCents": { + "type": "number", + "format": "double" }, - "webhookId": { - "type": "string" - } - }, - "required": [ - "_id", - "commentId", - "externalId", - "createdAt", - "tenantId", - "attemptCount", - "nextAttemptAt", - "eventType", - "type", - "domain", - "lastError" - ], - "type": "object", - "additionalProperties": false - }, - "GetPendingWebhookEventsResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "flexSSOAdminUnit": { + "type": "number", + "format": "double" }, - "pendingWebhookEvents": { - "items": { - "$ref": "#/components/schemas/PendingCommentToSyncOutbound" - }, - "type": "array" - } - }, - "required": [ - "status", - "pendingWebhookEvents" - ], - "type": "object", - "additionalProperties": false - }, - "GetPendingWebhookEventCountResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "flexSSOModeratorCostCents": { + "type": "number", + "format": "double" }, - "count": { + "flexSSOModeratorUnit": { "type": "number", "format": "double" } }, "required": [ - "status", - "count" + "name", + "maxMonthlyPageLoads", + "maxMonthlyAPICredits", + "maxMonthlyComments", + "maxConcurrentUsers", + "maxTenantUsers", + "maxSSOUsers", + "maxModerators", + "maxDomains", + "hasDebranding", + "forWhoText", + "featureTaglines", + "hasFlexPricing" ], "type": "object", "additionalProperties": false }, - "GetNotificationsResponse": { + "ReplaceTenantPackageBody": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "name": { + "type": "string" }, - "notifications": { - "items": { - "$ref": "#/components/schemas/UserNotification" - }, - "type": "array" - } - }, - "required": [ - "status", - "notifications" - ], - "type": "object", - "additionalProperties": false - }, - "GetNotificationCountResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "monthlyCostUSD": { + "type": "number", + "format": "double" }, - "count": { + "yearlyCostUSD": { "type": "number", "format": "double" - } - }, - "required": [ - "status", - "count" - ], - "type": "object", - "additionalProperties": false - }, - "UpdateNotificationBody": { - "properties": { - "viewed": { - "type": "boolean" }, - "optedOut": { - "type": "boolean" - } - }, - "type": "object", - "additionalProperties": {} - }, - "UserNotificationCount": { - "properties": { - "_id": { - "type": "string" + "maxMonthlyPageLoads": { + "type": "number", + "format": "double" }, - "count": { + "maxMonthlyAPICredits": { "type": "number", "format": "double" }, - "createdAt": { - "type": "string", - "format": "date-time" + "maxMonthlyComments": { + "type": "number", + "format": "double" }, - "expireAt": { - "type": "string", - "format": "date-time" - } - }, - "required": [ - "_id", - "count", - "createdAt", - "expireAt" - ], - "type": "object", - "additionalProperties": false - }, - "GetCachedNotificationCountResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "maxConcurrentUsers": { + "type": "number", + "format": "double" }, - "data": { - "$ref": "#/components/schemas/UserNotificationCount" - } - }, - "required": [ - "status", - "data" - ], - "type": "object", - "additionalProperties": false - }, - "Moderator": { - "properties": { - "_id": { - "type": "string" + "maxTenantUsers": { + "type": "number", + "format": "double" }, - "tenantId": { - "type": "string" + "maxSSOUsers": { + "type": "number", + "format": "double" }, - "name": { - "type": "string", - "nullable": true + "maxModerators": { + "type": "number", + "format": "double" }, - "userId": { - "type": "string", - "nullable": true + "maxDomains": { + "type": "number", + "format": "double" }, - "acceptedInvite": { + "maxCustomCollectionSize": { + "type": "number", + "format": "double" + }, + "hasDebranding": { "type": "boolean" }, - "email": { - "type": "string", - "nullable": true + "forWhoText": { + "type": "string" }, - "markReviewedCount": { + "featureTaglines": { + "items": { + "type": "string" + }, + "type": "array" + }, + "hasFlexPricing": { + "type": "boolean" + }, + "flexPageLoadCostCents": { "type": "number", "format": "double" }, - "deletedCount": { + "flexPageLoadUnit": { "type": "number", "format": "double" }, - "markedSpamCount": { + "flexCommentCostCents": { "type": "number", "format": "double" }, - "markedNotSpamCount": { + "flexCommentUnit": { "type": "number", "format": "double" }, - "approvedCount": { + "flexSSOUserCostCents": { "type": "number", "format": "double" }, - "unApprovedCount": { + "flexSSOUserUnit": { "type": "number", "format": "double" }, - "editedCount": { + "flexAPICreditCostCents": { "type": "number", "format": "double" }, - "bannedCount": { + "flexAPICreditUnit": { "type": "number", "format": "double" }, - "unFlaggedCount": { + "flexModeratorCostCents": { "type": "number", "format": "double" }, - "verificationId": { - "type": "string", - "nullable": true - }, - "createdAt": { - "type": "string", - "format": "date-time" + "flexModeratorUnit": { + "type": "number", + "format": "double" }, - "moderationGroupIds": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "flexAdminCostCents": { + "type": "number", + "format": "double" }, - "isEmailSuppressed": { - "type": "boolean" - } - }, - "required": [ - "_id", - "tenantId", - "name", - "userId", - "acceptedInvite", - "email", - "markReviewedCount", - "deletedCount", - "markedSpamCount", - "markedNotSpamCount", - "approvedCount", - "unApprovedCount", - "editedCount", - "bannedCount", - "unFlaggedCount", - "verificationId", - "createdAt", - "moderationGroupIds" - ], - "type": "object", - "additionalProperties": false - }, - "GetModeratorResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "flexAdminUnit": { + "type": "number", + "format": "double" }, - "moderator": { - "$ref": "#/components/schemas/Moderator" - } - }, - "required": [ - "status", - "moderator" - ], - "type": "object", - "additionalProperties": false - }, - "GetModeratorsResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "flexDomainCostCents": { + "type": "number", + "format": "double" }, - "moderators": { - "items": { - "$ref": "#/components/schemas/Moderator" - }, - "type": "array" - } - }, - "required": [ - "status", - "moderators" - ], - "type": "object", - "additionalProperties": false - }, - "CreateModeratorResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "flexDomainUnit": { + "type": "number", + "format": "double" }, - "moderator": { - "$ref": "#/components/schemas/Moderator" + "flexMinimumCostCents": { + "type": "number", + "format": "double" } }, "required": [ - "status", - "moderator" + "name", + "monthlyCostUSD", + "yearlyCostUSD", + "maxMonthlyPageLoads", + "maxMonthlyAPICredits", + "maxMonthlyComments", + "maxConcurrentUsers", + "maxTenantUsers", + "maxSSOUsers", + "maxModerators", + "maxDomains", + "hasDebranding", + "forWhoText", + "featureTaglines", + "hasFlexPricing" ], "type": "object", "additionalProperties": false }, - "CreateModeratorBody": { + "UpdateTenantPackageBody": { "properties": { "name": { "type": "string" }, - "email": { - "type": "string" + "monthlyCostUSD": { + "type": "number", + "format": "double" }, - "userId": { - "type": "string" + "yearlyCostUSD": { + "type": "number", + "format": "double" }, - "moderationGroupIds": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "name", - "email" - ], - "type": "object", - "additionalProperties": {} - }, - "UpdateModeratorBody": { - "properties": { - "name": { - "type": "string" + "maxMonthlyPageLoads": { + "type": "number", + "format": "double" }, - "email": { - "type": "string" + "maxMonthlyAPICredits": { + "type": "number", + "format": "double" }, - "userId": { - "type": "string" + "maxMonthlyComments": { + "type": "number", + "format": "double" }, - "moderationGroupIds": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object", - "additionalProperties": {} - }, - "TenantHashTag": { - "properties": { - "_id": { - "type": "string" + "maxConcurrentUsers": { + "type": "number", + "format": "double" }, - "createdAt": { - "type": "string", - "format": "date-time" + "maxTenantUsers": { + "type": "number", + "format": "double" }, - "tenantId": { - "type": "string" + "maxSSOUsers": { + "type": "number", + "format": "double" }, - "tag": { - "type": "string" + "maxModerators": { + "type": "number", + "format": "double" }, - "url": { + "maxDomains": { + "type": "number", + "format": "double" + }, + "maxCustomCollectionSize": { + "type": "number", + "format": "double" + }, + "hasDebranding": { + "type": "boolean" + }, + "hasWhiteLabeling": { + "type": "boolean" + }, + "forWhoText": { "type": "string" - } - }, - "required": [ - "_id", - "createdAt", - "tenantId", - "tag" - ], - "type": "object", - "additionalProperties": false - }, - "GetHashTagsResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" }, - "hashTags": { + "featureTaglines": { "items": { - "$ref": "#/components/schemas/TenantHashTag" + "type": "string" }, "type": "array" - } - }, - "required": [ - "status", - "hashTags" - ], - "type": "object", - "additionalProperties": false - }, - "CreateHashTagResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" }, - "hashTag": { - "$ref": "#/components/schemas/TenantHashTag" + "hasFlexPricing": { + "type": "boolean" + }, + "flexPageLoadCostCents": { + "type": "number", + "format": "double" + }, + "flexPageLoadUnit": { + "type": "number", + "format": "double" + }, + "flexCommentCostCents": { + "type": "number", + "format": "double" + }, + "flexCommentUnit": { + "type": "number", + "format": "double" + }, + "flexSSOUserCostCents": { + "type": "number", + "format": "double" + }, + "flexSSOUserUnit": { + "type": "number", + "format": "double" + }, + "flexAPICreditCostCents": { + "type": "number", + "format": "double" + }, + "flexAPICreditUnit": { + "type": "number", + "format": "double" + }, + "flexModeratorCostCents": { + "type": "number", + "format": "double" + }, + "flexModeratorUnit": { + "type": "number", + "format": "double" + }, + "flexAdminCostCents": { + "type": "number", + "format": "double" + }, + "flexAdminUnit": { + "type": "number", + "format": "double" + }, + "flexDomainCostCents": { + "type": "number", + "format": "double" + }, + "flexDomainUnit": { + "type": "number", + "format": "double" + }, + "flexMinimumCostCents": { + "type": "number", + "format": "double" } }, - "required": [ - "status", - "hashTag" - ], "type": "object", "additionalProperties": false }, - "CreateHashTagBody": { + "APITenantDailyUsage": { "properties": { - "tenantId": { + "id": { "type": "string" }, - "tag": { + "tenantId": { "type": "string" }, - "url": { - "type": "string" + "yearNumber": { + "type": "number", + "format": "double" + }, + "monthNumber": { + "type": "number", + "format": "double" + }, + "dayNumber": { + "type": "number", + "format": "double" + }, + "commentFetchCount": { + "type": "number", + "format": "double" + }, + "commentCreateCount": { + "type": "number", + "format": "double" + }, + "conversationCreateCount": { + "type": "number", + "format": "double" + }, + "voteCount": { + "type": "number", + "format": "double" + }, + "accountCreatedCount": { + "type": "number", + "format": "double" + }, + "userMentionSearch": { + "type": "number", + "format": "double" + }, + "hashTagSearch": { + "type": "number", + "format": "double" + }, + "gifSearchTrending": { + "type": "number", + "format": "double" + }, + "gifSearch": { + "type": "number", + "format": "double" + }, + "apiCreditsUsed": { + "type": "number", + "format": "double" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "billed": { + "type": "boolean" + }, + "ignored": { + "type": "boolean" + }, + "apiErrorCount": { + "type": "number", + "format": "double" } }, "required": [ - "tag" + "id", + "tenantId", + "yearNumber", + "monthNumber", + "dayNumber", + "commentFetchCount", + "commentCreateCount", + "conversationCreateCount", + "voteCount", + "accountCreatedCount", + "userMentionSearch", + "hashTagSearch", + "gifSearchTrending", + "gifSearch", + "apiCreditsUsed", + "createdAt", + "billed", + "ignored", + "apiErrorCount" ], "type": "object", "additionalProperties": false }, - "BulkCreateHashTagsResponse": { + "GetTenantDailyUsagesResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "results": { + "tenantDailyUsages": { "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/CreateHashTagResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APITenantDailyUsage" }, "type": "array" } }, "required": [ "status", - "results" + "tenantDailyUsages" ], "type": "object", "additionalProperties": false }, - "BulkCreateHashTagsBody": { + "MetaItem": { "properties": { - "tenantId": { + "name": { "type": "string" }, - "tags": { + "values": { "items": { - "properties": { - "url": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "required": [ - "tag" - ], - "type": "object" + "type": "string" }, "type": "array" } }, "required": [ - "tags" + "name", + "values" ], "type": "object", "additionalProperties": false }, - "UpdateHashTagResponse": { + "QuestionResult": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "hashTag": { - "$ref": "#/components/schemas/TenantHashTag" + "_id": { + "type": "string" + }, + "tenantId": { + "type": "string" + }, + "urlId": { + "type": "string" + }, + "anonUserId": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "value": { + "type": "integer", + "format": "int32" + }, + "commentId": { + "type": "string", + "nullable": true + }, + "questionId": { + "type": "string" + }, + "meta": { + "items": { + "$ref": "#/components/schemas/MetaItem" + }, + "type": "array", + "nullable": true + }, + "ipHash": { + "type": "string" } }, "required": [ - "status", - "hashTag" + "_id", + "tenantId", + "urlId", + "anonUserId", + "userId", + "createdAt", + "value", + "questionId", + "ipHash" ], "type": "object", "additionalProperties": false }, - "UpdateHashTagBody": { + "GetQuestionResultResponse": { "properties": { - "tenantId": { - "type": "string" - }, - "url": { - "type": "string" + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "tag": { - "type": "string" + "questionResult": { + "$ref": "#/components/schemas/QuestionResult" } }, + "required": [ + "status", + "questionResult" + ], "type": "object", "additionalProperties": false }, - "GetFeedPostsResponse": { + "GetQuestionResultsResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "feedPosts": { + "questionResults": { "items": { - "$ref": "#/components/schemas/FeedPost" + "$ref": "#/components/schemas/QuestionResult" }, "type": "array" } }, "required": [ "status", - "feedPosts" + "questionResults" ], "type": "object", "additionalProperties": false }, - "CreateFeedPostsResponse": { + "CreateQuestionResultResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "feedPost": { - "$ref": "#/components/schemas/FeedPost" + "questionResult": { + "$ref": "#/components/schemas/QuestionResult" } }, "required": [ "status", - "feedPost" + "questionResult" ], "type": "object", "additionalProperties": false }, - "Record_string.unknown_": { - "properties": {}, - "additionalProperties": {}, - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, - "Record_string.Record_string.string__": { - "properties": {}, - "additionalProperties": { - "$ref": "#/components/schemas/Record_string.string_" - }, - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, - "EmailTemplateDefinition": { + "CreateQuestionResultBody": { "properties": { - "emailTemplateId": { + "urlId": { "type": "string" }, - "defaultTestData": { - "$ref": "#/components/schemas/Record_string.unknown_" + "value": { + "type": "number", + "format": "double" }, - "defaultTranslationsByLocale": { - "$ref": "#/components/schemas/Record_string.Record_string.string__" + "questionId": { + "type": "string" }, - "defaultEJS": { + "anonUserId": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "commentId": { "type": "string" + }, + "meta": { + "items": { + "$ref": "#/components/schemas/MetaItem" + }, + "type": "array", + "nullable": true } }, "required": [ - "emailTemplateId", - "defaultTestData", - "defaultTranslationsByLocale", - "defaultEJS" + "urlId", + "value", + "questionId" ], "type": "object", - "additionalProperties": false + "additionalProperties": {} }, - "GetEmailTemplateDefinitionsResponse": { + "UpdateQuestionResultBody": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "urlId": { + "type": "string" }, - "definitions": { + "anonUserId": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "value": { + "type": "number", + "format": "double" + }, + "commentId": { + "type": "string" + }, + "questionId": { + "type": "string" + }, + "meta": { "items": { - "$ref": "#/components/schemas/EmailTemplateDefinition" + "$ref": "#/components/schemas/MetaItem" }, - "type": "array" + "type": "array", + "nullable": true + } + }, + "type": "object", + "additionalProperties": {} + }, + "Record_number.number_": { + "properties": {}, + "additionalProperties": { + "type": "number", + "format": "double" + }, + "type": "object", + "description": "Construct a type with a set of properties K of type T" + }, + "QuestionDatum": { + "properties": { + "v": { + "$ref": "#/components/schemas/Record_number.number_" + }, + "total": { + "type": "integer", + "format": "int64" } }, "required": [ - "status", - "definitions" + "v", + "total" ], "type": "object", "additionalProperties": false }, - "EmailTemplateRenderErrorResponse": { + "Record_string.QuestionDatum_": { + "properties": {}, + "additionalProperties": { + "$ref": "#/components/schemas/QuestionDatum" + }, + "type": "object", + "description": "Construct a type with a set of properties K of type T" + }, + "QuestionResultAggregationOverall": { "properties": { - "id": { - "type": "string" + "dataByDateBucket": { + "$ref": "#/components/schemas/Record_string.QuestionDatum_" }, - "tenantId": { - "type": "string" + "dataByUrlId": { + "$ref": "#/components/schemas/Record_string.QuestionDatum_" }, - "customTemplateId": { - "type": "string" + "countsByValue": { + "$ref": "#/components/schemas/Int32Map" }, - "error": { - "type": "string" + "total": { + "type": "integer", + "format": "int64" }, - "count": { + "average": { "type": "number", "format": "double" }, "createdAt": { "type": "string", "format": "date-time" - }, - "lastOccurredAt": { - "type": "string", - "format": "date-time" } }, "required": [ - "id", - "tenantId", - "customTemplateId", - "error", - "count", - "createdAt", - "lastOccurredAt" + "total", + "createdAt" ], "type": "object", "additionalProperties": false }, - "GetEmailTemplateRenderErrorsResponse": { + "AggregateQuestionResultsResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "renderErrors": { - "items": { - "$ref": "#/components/schemas/EmailTemplateRenderErrorResponse" - }, - "type": "array" + "data": { + "$ref": "#/components/schemas/QuestionResultAggregationOverall" } }, "required": [ "status", - "renderErrors" + "data" ], "type": "object", "additionalProperties": false }, - "CustomEmailTemplate": { - "properties": { - "_id": { - "type": "string" - }, - "tenantId": { - "type": "string" - }, - "emailTemplateId": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updatedByUserId": { - "type": "string", - "nullable": true - }, - "domain": { - "type": "string", - "nullable": true - }, - "ejs": { - "type": "string" - }, - "translationOverridesByLocale": { - "$ref": "#/components/schemas/Record_string.Record_string.string__" - }, - "testData": {} + "AggregateTimeBucket": { + "type": "string", + "enum": [ + "day", + "month", + "year" + ] + }, + "Record_string.QuestionResultAggregationOverall_": { + "properties": {}, + "additionalProperties": { + "$ref": "#/components/schemas/QuestionResultAggregationOverall" }, - "required": [ - "_id", - "tenantId", - "emailTemplateId", - "displayName", - "createdAt", - "updatedAt", - "updatedByUserId", - "ejs", - "translationOverridesByLocale", - "testData" - ], "type": "object", - "additionalProperties": false + "description": "Construct a type with a set of properties K of type T" }, - "GetEmailTemplateResponse": { + "BulkAggregateQuestionResultsResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "emailTemplate": { - "$ref": "#/components/schemas/CustomEmailTemplate" + "data": { + "$ref": "#/components/schemas/Record_string.QuestionResultAggregationOverall_" } }, "required": [ "status", - "emailTemplate" + "data" ], "type": "object", "additionalProperties": false }, - "GetEmailTemplatesResponse": { + "BulkAggregateQuestionItem": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "aggId": { + "type": "string" }, - "emailTemplates": { + "questionId": { + "type": "string" + }, + "questionIds": { "items": { - "$ref": "#/components/schemas/CustomEmailTemplate" + "type": "string" }, "type": "array" + }, + "urlId": { + "type": "string" + }, + "timeBucket": { + "$ref": "#/components/schemas/AggregateTimeBucket" + }, + "startDate": { + "type": "string", + "format": "date-time" } }, "required": [ - "status", - "emailTemplates" + "aggId" ], "type": "object", "additionalProperties": false }, - "CreateEmailTemplateResponse": { + "BulkAggregateQuestionResultsRequest": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - }, - "emailTemplate": { - "$ref": "#/components/schemas/CustomEmailTemplate" + "aggregations": { + "items": { + "$ref": "#/components/schemas/BulkAggregateQuestionItem" + }, + "type": "array" } }, "required": [ - "status", - "emailTemplate" + "aggregations" ], "type": "object", "additionalProperties": false }, - "CreateEmailTemplateBody": { + "CommentLogType": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55 + ], + "type": "integer" + }, + "RepeatCommentHandlingAction": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer" + }, + "RepeatCommentCheckIgnoredReason": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "type": "integer" + }, + "CommentLogData": { "properties": { - "emailTemplateId": { - "type": "string" + "clearContent": { + "type": "boolean" }, - "displayName": { + "isDeletedUser": { + "type": "boolean" + }, + "phrase": { "type": "string" }, - "ejs": { + "badWord": { "type": "string" }, - "domain": { + "word": { "type": "string" }, - "translationOverridesByLocale": { - "$ref": "#/components/schemas/Record_string.Record_string.string__" + "locale": { + "type": "string" }, - "testData": { - "$ref": "#/components/schemas/Record_string.unknown_" - } - }, - "required": [ - "emailTemplateId", - "displayName", - "ejs" - ], - "type": "object", - "additionalProperties": false - }, - "UpdateEmailTemplateBody": { - "properties": { - "emailTemplateId": { + "tenantBadgeId": { "type": "string" }, - "displayName": { + "badgeId": { "type": "string" }, - "ejs": { + "wasLoggedIn": { + "type": "boolean" + }, + "foundUser": { + "type": "boolean" + }, + "verified": { + "type": "boolean" + }, + "engine": { "type": "string" }, - "domain": { + "engineResponse": { "type": "string" }, - "translationOverridesByLocale": { - "$ref": "#/components/schemas/Record_string.Record_string.string__" + "engineTokens": { + "type": "number", + "format": "double" }, - "testData": { - "$ref": "#/components/schemas/Record_string.unknown_" - } - }, - "type": "object", - "additionalProperties": false - }, - "RenderEmailTemplateResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "trustFactor": { + "type": "number", + "format": "double" }, - "html": { - "type": "string" - } - }, - "required": [ - "status", - "html" - ], - "type": "object", - "additionalProperties": false - }, - "RenderEmailTemplateBody": { - "properties": { - "emailTemplateId": { + "source": { "type": "string" }, - "ejs": { + "rule": { + "$ref": "#/components/schemas/SpamRule" + }, + "userId": { "type": "string" }, - "testData": { - "$ref": "#/components/schemas/Record_string.unknown_" + "subscribers": { + "type": "number", + "format": "double" }, - "translationOverridesByLocale": { - "$ref": "#/components/schemas/Record_string.Record_string.string__" - } - }, - "required": [ - "emailTemplateId", - "ejs" - ], - "type": "object", - "additionalProperties": false - }, - "AddDomainConfigParams": { - "properties": { - "domain": { - "type": "string" + "notificationCount": { + "type": "number", + "format": "double" }, - "emailFromName": { + "votesBefore": { + "type": "number", + "format": "double", + "nullable": true + }, + "votesUpBefore": { + "type": "number", + "format": "double", + "nullable": true + }, + "votesDownBefore": { + "type": "number", + "format": "double", + "nullable": true + }, + "votesAfter": { + "type": "number", + "format": "double", + "nullable": true + }, + "votesUpAfter": { + "type": "number", + "format": "double", + "nullable": true + }, + "votesDownAfter": { + "type": "number", + "format": "double", + "nullable": true + }, + "repeatAction": { + "$ref": "#/components/schemas/RepeatCommentHandlingAction" + }, + "reason": { + "$ref": "#/components/schemas/RepeatCommentCheckIgnoredReason" + }, + "otherData": {}, + "spamBefore": { + "type": "boolean" + }, + "spamAfter": { + "type": "boolean" + }, + "permanentFlag": { + "type": "string", + "enum": [ + "permanent" + ], + "nullable": false + }, + "approvedBefore": { + "type": "boolean" + }, + "approvedAfter": { + "type": "boolean" + }, + "reviewedBefore": { + "type": "boolean" + }, + "reviewedAfter": { + "type": "boolean" + }, + "textBefore": { "type": "string" }, - "emailFromEmail": { + "textAfter": { "type": "string" }, - "logoSrc": { + "expireBefore": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "expireAfter": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "flagCountBefore": { + "type": "number", + "format": "double", + "nullable": true + }, + "trustFactorBefore": { + "type": "number", + "format": "double" + }, + "trustFactorAfter": { + "type": "number", + "format": "double" + }, + "referencedCommentId": { "type": "string" }, - "logoSrc100px": { + "invalidLocale": { "type": "string" }, - "footerUnsubscribeURL": { + "detectedLocale": { "type": "string" }, - "emailHeaders": { - "$ref": "#/components/schemas/Record_string.string_" + "detectedLanguage": { + "type": "string" } }, - "required": [ - "domain" - ], "type": "object", "additionalProperties": false }, - "UpdateDomainConfigParams": { + "CommentLogEntry": { "properties": { - "domain": { - "type": "string" - }, - "emailFromName": { - "type": "string" - }, - "emailFromEmail": { - "type": "string" - }, - "logoSrc": { - "type": "string" - }, - "logoSrc100px": { - "type": "string" + "d": { + "type": "string", + "format": "date-time" }, - "footerUnsubscribeURL": { - "type": "string" + "t": { + "$ref": "#/components/schemas/CommentLogType" }, - "emailHeaders": { - "$ref": "#/components/schemas/Record_string.string_" + "da": { + "$ref": "#/components/schemas/CommentLogData" } }, "required": [ - "domain" + "d", + "t" ], "type": "object", "additionalProperties": false }, - "PatchDomainConfigParams": { + "FComment": { "properties": { - "domain": { - "type": "string" - }, - "emailFromName": { + "_id": { "type": "string" }, - "emailFromEmail": { + "tenantId": { "type": "string" }, - "logoSrc": { + "urlId": { "type": "string" }, - "logoSrc100px": { + "urlIdRaw": { "type": "string" }, - "footerUnsubscribeURL": { + "url": { "type": "string" }, - "emailHeaders": { - "$ref": "#/components/schemas/Record_string.string_" - } - }, - "type": "object", - "additionalProperties": false - }, - "APICommentBase": { - "properties": { - "_id": { - "type": "string" + "pageTitle": { + "type": "string", + "nullable": true }, - "aiDeterminedSpam": { - "type": "boolean" + "userId": { + "allOf": [ + { + "$ref": "#/components/schemas/UserId" + } + ], + "nullable": true }, "anonUserId": { "type": "string", "nullable": true }, - "approved": { - "type": "boolean" - }, - "avatarSrc": { + "commenterEmail": { "type": "string", "nullable": true }, - "badges": { - "items": { - "$ref": "#/components/schemas/CommentUserBadgeInfo" - }, - "type": "array", + "commenterName": { + "type": "string" + }, + "commenterLink": { + "type": "string", "nullable": true }, "comment": { @@ -8541,88 +8830,134 @@ "commentHTML": { "type": "string" }, - "commenterEmail": { - "type": "string", - "nullable": true - }, - "commenterLink": { + "parentId": { "type": "string", "nullable": true }, - "commenterName": { - "type": "string" - }, "date": { "type": "string", "format": "date-time", "nullable": true }, - "displayLabel": { + "localDateString": { "type": "string", "nullable": true }, - "domain": { - "allOf": [ - { - "$ref": "#/components/schemas/FDomain" - } - ], + "localDateHours": { + "type": "integer", + "format": "int32", "nullable": true }, - "externalId": { - "type": "string" - }, - "externalParentId": { - "type": "string", + "votes": { + "type": "integer", + "format": "int32", "nullable": true }, - "expireAt": { - "type": "string", - "format": "date-time", + "votesUp": { + "type": "integer", + "format": "int32", "nullable": true }, - "feedbackIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "flagCount": { + "votesDown": { "type": "integer", "format": "int32", "nullable": true }, - "fromProductId": { - "type": "integer", - "format": "int32" + "expireAt": { + "type": "string", + "format": "date-time", + "nullable": true }, - "hasCode": { + "verified": { + "type": "boolean" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "verificationId": { + "type": "string", + "nullable": true + }, + "notificationSentForParent": { + "type": "boolean" + }, + "notificationSentForParentTenant": { + "type": "boolean" + }, + "reviewed": { + "type": "boolean" + }, + "imported": { + "type": "boolean" + }, + "externalId": { + "type": "string" + }, + "externalParentId": { + "type": "string", + "nullable": true + }, + "avatarSrc": { + "type": "string", + "nullable": true + }, + "isSpam": { + "type": "boolean" + }, + "permNotSpam": { + "type": "boolean" + }, + "aiDeterminedSpam": { "type": "boolean" }, "hasImages": { "type": "boolean" }, + "pageNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "pageNumberOF": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "pageNumberNF": { + "type": "integer", + "format": "int32", + "nullable": true + }, "hasLinks": { "type": "boolean" }, - "hashTags": { - "items": { - "$ref": "#/components/schemas/CommentUserHashTagInfo" - }, - "type": "array" - }, - "isByAdmin": { + "hasCode": { "type": "boolean" }, - "isByModerator": { + "approved": { "type": "boolean" }, + "locale": { + "type": "string", + "nullable": true + }, "isDeleted": { "type": "boolean" }, "isDeletedUser": { "type": "boolean" }, + "isBannedUser": { + "type": "boolean" + }, + "isByAdmin": { + "type": "boolean" + }, + "isByModerator": { + "type": "boolean" + }, "isPinned": { "type": "boolean", "nullable": true @@ -8631,30 +8966,29 @@ "type": "boolean", "nullable": true }, - "isSpam": { - "type": "boolean" - }, - "localDateHours": { + "flagCount": { "type": "integer", "format": "int32", "nullable": true }, - "localDateString": { - "type": "string", + "rating": { + "type": "number", + "format": "double", "nullable": true }, - "locale": { + "displayLabel": { "type": "string", "nullable": true }, - "mentions": { - "items": { - "$ref": "#/components/schemas/CommentUserMentionInfo" - }, - "type": "array" + "fromProductId": { + "type": "integer", + "format": "int32" }, "meta": { "properties": { + "wpId": { + "type": "string" + }, "wpUserId": { "type": "string" }, @@ -8666,956 +9000,6140 @@ "type": "object", "nullable": true }, - "moderationGroupIds": { + "ipHash": { + "type": "string" + }, + "mentions": { "items": { - "type": "string" + "$ref": "#/components/schemas/CommentUserMentionInfo" }, - "type": "array", - "nullable": true - }, - "notificationSentForParent": { - "type": "boolean" + "type": "array" }, - "notificationSentForParentTenant": { - "type": "boolean" + "hashTags": { + "items": { + "$ref": "#/components/schemas/CommentUserHashTagInfo" + }, + "type": "array" }, - "pageTitle": { - "type": "string", + "badges": { + "items": { + "$ref": "#/components/schemas/CommentUserBadgeInfo" + }, + "type": "array", "nullable": true }, - "parentId": { - "type": "string", + "domain": { + "allOf": [ + { + "$ref": "#/components/schemas/FDomain" + } + ], "nullable": true }, - "rating": { - "type": "number", - "format": "double", + "veteranBadgeProcessed": { + "type": "string" + }, + "moderationGroupIds": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "reviewed": { + "didProcessBadges": { "type": "boolean" }, - "tenantId": { - "type": "string" + "fromOfflineRestore": { + "type": "boolean" }, - "url": { + "autoplayJobId": { "type": "string" }, - "urlId": { - "type": "string" + "autoplayDelayMS": { + "type": "integer", + "format": "int64" }, - "urlIdRaw": { - "type": "string" + "feedbackIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "userId": { - "allOf": [ - { - "$ref": "#/components/schemas/UserId" - } - ], + "logs": { + "items": { + "$ref": "#/components/schemas/CommentLogEntry" + }, + "type": "array", "nullable": true }, - "verified": { - "type": "boolean" - }, - "verifiedDate": { - "type": "string", - "format": "date-time", + "groupIds": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "votes": { + "viewCount": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "votesDown": { - "type": "integer", - "format": "int32", - "nullable": true + "requiresVerification": { + "type": "boolean" }, - "votesUp": { - "type": "integer", - "format": "int32", - "nullable": true + "editKey": { + "type": "string" + }, + "tosAcceptedAt": { + "type": "string", + "format": "date-time" + }, + "botId": { + "type": "string" } }, "required": [ "_id", - "approved", + "tenantId", + "urlId", + "url", + "commenterName", "comment", "commentHTML", - "commenterName", "date", - "locale", - "tenantId", - "url", - "urlId", - "verified" + "verified", + "approved", + "locale" ], "type": "object", "additionalProperties": false }, - "APIComment": { - "allOf": [ - { - "$ref": "#/components/schemas/APICommentBase" + "FindCommentsByRangeItem": { + "properties": { + "comment": { + "allOf": [ + { + "$ref": "#/components/schemas/FComment" + } + ], + "nullable": true }, - { - "properties": { - "date": { - "type": "number", - "format": "double", - "nullable": true - } - }, - "required": [ - "date" - ], - "type": "object" + "result": { + "$ref": "#/components/schemas/QuestionResult" } - ] + }, + "required": [ + "comment", + "result" + ], + "type": "object", + "additionalProperties": false }, - "APIGetCommentResponse": { + "FindCommentsByRangeResponse": { "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" + "results": { + "items": { + "$ref": "#/components/schemas/FindCommentsByRangeItem" + }, + "type": "array" }, - "comment": { - "$ref": "#/components/schemas/APIComment" + "createdAt": { + "type": "string", + "format": "date-time" } }, "required": [ - "status", - "comment" + "results", + "createdAt" ], "type": "object", "additionalProperties": false }, - "APIGetCommentsResponse": { + "CombineQuestionResultsWithCommentsResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "comments": { - "items": { - "$ref": "#/components/schemas/APIComment" - }, - "type": "array" + "data": { + "$ref": "#/components/schemas/FindCommentsByRangeResponse" } }, "required": [ "status", - "comments" + "data" ], "type": "object", "additionalProperties": false }, - "UpdatableCommentParams": { + "QuestionConfig": { "properties": { - "urlId": { + "_id": { "type": "string" }, - "urlIdRaw": { + "tenantId": { "type": "string" }, - "url": { + "name": { "type": "string" }, - "pageTitle": { - "type": "string", - "nullable": true - }, - "userId": { - "allOf": [ - { - "$ref": "#/components/schemas/UserId" - } - ], - "nullable": true - }, - "commenterEmail": { - "type": "string", - "nullable": true - }, - "commenterName": { + "question": { "type": "string" }, - "commenterLink": { - "type": "string", - "nullable": true - }, - "comment": { + "summaryLabel": { "type": "string" }, - "commentHTML": { + "helpText": { "type": "string" }, - "parentId": { - "type": "string", - "nullable": true - }, - "date": { - "type": "number", - "format": "double", - "nullable": true - }, - "localDateString": { - "type": "string", - "nullable": true - }, - "localDateHours": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "votes": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "votesUp": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "votesDown": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "expireAt": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "verified": { - "type": "boolean" - }, - "verifiedDate": { + "createdAt": { "type": "string", - "format": "date-time", - "nullable": true - }, - "notificationSentForParent": { - "type": "boolean" - }, - "notificationSentForParentTenant": { - "type": "boolean" - }, - "reviewed": { - "type": "boolean" + "format": "date-time" }, - "externalId": { + "createdBy": { "type": "string" }, - "externalParentId": { - "type": "string", - "nullable": true + "usedCount": { + "type": "number", + "format": "double" }, - "avatarSrc": { + "lastUsed": { "type": "string", - "nullable": true - }, - "isSpam": { - "type": "boolean" - }, - "approved": { - "type": "boolean" - }, - "isDeleted": { - "type": "boolean" - }, - "isDeletedUser": { - "type": "boolean" + "format": "date-time" }, - "isByAdmin": { - "type": "boolean" + "type": { + "type": "string" }, - "isByModerator": { - "type": "boolean" + "numStars": { + "type": "number", + "format": "double" }, - "isPinned": { - "type": "boolean", - "nullable": true + "min": { + "type": "number", + "format": "double" }, - "isLocked": { - "type": "boolean", - "nullable": true + "max": { + "type": "number", + "format": "double" }, - "flagCount": { - "type": "integer", - "format": "int32", - "nullable": true + "defaultValue": { + "type": "number", + "format": "double" }, - "displayLabel": { - "type": "string", - "nullable": true + "labelNegative": { + "type": "string" }, - "meta": { - "properties": { - "wpUserId": { - "type": "string" - }, - "wpPostId": { - "type": "string" - } - }, - "additionalProperties": {}, - "type": "object", - "nullable": true + "labelPositive": { + "type": "string" }, - "moderationGroupIds": { + "customOptions": { "items": { - "type": "string" + "properties": { + "imageSrc": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "imageSrc", + "name" + ], + "type": "object" }, - "type": "array", - "nullable": true + "type": "array" }, - "feedbackIds": { + "subQuestionIds": { "items": { "type": "string" }, "type": "array" + }, + "alwaysShowSubQuestions": { + "type": "boolean" + }, + "reportingOrder": { + "type": "number", + "format": "double" } }, - "type": "object", - "additionalProperties": false - }, - "DeleteCommentAction": { - "type": "string", - "enum": [ - "already-deleted", - "hard-removed", - "anonymized" - ] - }, - "DeleteCommentResult": { - "properties": { - "action": { - "$ref": "#/components/schemas/DeleteCommentAction" - }, - "status": { + "required": [ + "_id", + "tenantId", + "name", + "question", + "helpText", + "createdAt", + "createdBy", + "usedCount", + "lastUsed", + "type", + "numStars", + "min", + "max", + "defaultValue", + "labelNegative", + "labelPositive", + "customOptions", + "subQuestionIds", + "alwaysShowSubQuestions", + "reportingOrder" + ], + "type": "object", + "additionalProperties": false + }, + "GetQuestionConfigResponse": { + "properties": { + "status": { "$ref": "#/components/schemas/APIStatus" + }, + "questionConfig": { + "$ref": "#/components/schemas/QuestionConfig" } }, "required": [ - "action", - "status" + "status", + "questionConfig" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "SaveCommentResponse": { + "GetQuestionConfigsResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "comment": { - "$ref": "#/components/schemas/FComment" - }, - "user": { - "allOf": [ - { - "$ref": "#/components/schemas/UserSessionInfo" - } - ], - "nullable": true - }, - "moduleData": { - "$ref": "#/components/schemas/Record_string.any_" + "questionConfigs": { + "items": { + "$ref": "#/components/schemas/QuestionConfig" + }, + "type": "array" } }, "required": [ "status", - "comment", - "user" + "questionConfigs" ], "type": "object", "additionalProperties": false }, - "CreateCommentParams": { + "CreateQuestionConfigResponse": { "properties": { - "date": { - "type": "integer", - "format": "int64" + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "localDateString": { + "questionConfig": { + "$ref": "#/components/schemas/QuestionConfig" + } + }, + "required": [ + "status", + "questionConfig" + ], + "type": "object", + "additionalProperties": false + }, + "CreateQuestionConfigBody": { + "properties": { + "name": { "type": "string" }, - "localDateHours": { - "type": "integer", - "format": "int32" + "question": { + "type": "string" }, - "commenterName": { + "helpText": { "type": "string" }, - "commenterEmail": { - "type": "string", - "nullable": true + "type": { + "type": "string" }, - "commenterLink": { - "type": "string", - "nullable": true + "numStars": { + "type": "number", + "format": "double" }, - "comment": { - "type": "string" + "min": { + "type": "number", + "format": "double" }, - "productId": { - "type": "integer", - "format": "int32" + "max": { + "type": "number", + "format": "double" }, - "userId": { - "type": "string", - "nullable": true + "defaultValue": { + "type": "number", + "format": "double" }, - "avatarSrc": { - "type": "string", - "nullable": true + "labelNegative": { + "type": "string" }, - "parentId": { - "type": "string", - "nullable": true + "labelPositive": { + "type": "string" }, - "mentions": { + "customOptions": { "items": { - "$ref": "#/components/schemas/CommentUserMentionInfo" + "properties": { + "imageSrc": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "imageSrc", + "name" + ], + "type": "object" }, "type": "array" }, - "hashTags": { + "subQuestionIds": { "items": { - "$ref": "#/components/schemas/CommentUserHashTagInfo" + "type": "string" }, "type": "array" }, - "pageTitle": { + "alwaysShowSubQuestions": { + "type": "boolean" + }, + "reportingOrder": { + "type": "number", + "format": "double" + } + }, + "required": [ + "name", + "question", + "type", + "reportingOrder" + ], + "type": "object", + "additionalProperties": {} + }, + "UpdateQuestionConfigBody": { + "properties": { + "name": { "type": "string" }, - "isFromMyAccountPage": { - "type": "boolean" + "question": { + "type": "string" }, - "url": { + "helpText": { "type": "string" }, - "urlId": { + "type": { "type": "string" }, - "meta": { - "additionalProperties": false, - "type": "object" + "numStars": { + "type": "number", + "format": "double" }, - "moderationGroupIds": { - "items": { - "type": "string" - }, - "type": "array" + "min": { + "type": "number", + "format": "double" }, - "rating": { + "max": { "type": "number", "format": "double" }, - "fromOfflineRestore": { - "type": "boolean" + "defaultValue": { + "type": "number", + "format": "double" }, - "autoplayDelayMS": { - "type": "integer", - "format": "int64" + "labelNegative": { + "type": "string" }, - "feedbackIds": { + "labelPositive": { + "type": "string" + }, + "customOptions": { "items": { - "type": "string" + "properties": { + "imageSrc": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "imageSrc", + "name" + ], + "type": "object" }, "type": "array" }, - "questionValues": { - "$ref": "#/components/schemas/Record_string.string-or-number_" - }, - "tos": { - "type": "boolean" + "subQuestionIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "approved": { + "alwaysShowSubQuestions": { "type": "boolean" }, - "domain": { + "reportingOrder": { + "type": "number", + "format": "double" + } + }, + "type": "object", + "additionalProperties": {} + }, + "PendingCommentToSyncOutbound": { + "properties": { + "_id": { "type": "string" }, - "ip": { + "commentId": { "type": "string" }, - "isPinned": { - "type": "boolean" + "comment": { + "$ref": "#/components/schemas/FComment" }, - "locale": { + "externalId": { "type": "string", - "description": "Example: en_us" + "nullable": true }, - "reviewed": { - "type": "boolean" + "createdAt": { + "type": "string", + "format": "date-time" }, - "verified": { - "type": "boolean" + "tenantId": { + "type": "string" }, - "votes": { - "type": "integer", - "format": "int32" + "attemptCount": { + "type": "number", + "format": "double" }, - "votesDown": { - "type": "integer", - "format": "int32" + "nextAttemptAt": { + "type": "string", + "format": "date-time" }, - "votesUp": { - "type": "integer", - "format": "int32" + "eventType": { + "type": "number", + "format": "double" + }, + "type": { + "type": "number", + "format": "double" + }, + "domain": { + "type": "string" + }, + "lastError": { + "additionalProperties": false, + "type": "object" + }, + "webhookId": { + "type": "string" } }, "required": [ - "commenterName", - "comment", - "url", - "urlId", - "locale" + "_id", + "commentId", + "externalId", + "createdAt", + "tenantId", + "attemptCount", + "nextAttemptAt", + "eventType", + "type", + "domain", + "lastError" ], "type": "object", "additionalProperties": false }, - "FlagCommentResponse": { + "GetPendingWebhookEventsResponse": { "properties": { - "statusCode": { - "type": "integer", - "format": "int32" - }, "status": { "$ref": "#/components/schemas/APIStatus" }, - "code": { - "type": "string" - }, - "reason": { - "type": "string" - }, - "wasUnapproved": { - "type": "boolean" + "pendingWebhookEvents": { + "items": { + "$ref": "#/components/schemas/PendingCommentToSyncOutbound" + }, + "type": "array" } }, "required": [ - "status" + "status", + "pendingWebhookEvents" ], "type": "object", "additionalProperties": false }, - "BlockFromCommentParams": { + "GetPendingWebhookEventCountResponse": { "properties": { - "commentIdsToCheck": { - "items": { - "type": "string" - }, - "type": "array" + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "count": { + "type": "number", + "format": "double" } }, + "required": [ + "status", + "count" + ], "type": "object", "additionalProperties": false }, - "UnBlockFromCommentParams": { + "GetNotificationsResponse": { "properties": { - "commentIdsToCheck": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "notifications": { "items": { - "type": "string" + "$ref": "#/components/schemas/UserNotification" }, "type": "array" } }, + "required": [ + "status", + "notifications" + ], "type": "object", "additionalProperties": false }, - "APIAuditLog": { + "GetNotificationCountResponse": { "properties": { - "_id": { - "type": "string" - }, - "userId": { - "type": "string" + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "username": { - "type": "string" + "count": { + "type": "number", + "format": "double" + } + }, + "required": [ + "status", + "count" + ], + "type": "object", + "additionalProperties": false + }, + "UpdateNotificationBody": { + "properties": { + "viewed": { + "type": "boolean" }, - "resourceName": { + "optedOut": { + "type": "boolean" + } + }, + "type": "object", + "additionalProperties": {} + }, + "UserNotificationCount": { + "properties": { + "_id": { "type": "string" }, - "crudType": { - "type": "string", - "enum": [ - "c", - "r", - "u", - "d", - "login" - ] - }, - "from": { - "type": "string", - "enum": [ - "ui", - "api", - "cron" - ] - }, - "url": { - "type": "string", - "nullable": true - }, - "ip": { - "type": "string", - "nullable": true + "count": { + "type": "number", + "format": "double" }, - "when": { + "createdAt": { "type": "string", "format": "date-time" }, - "description": { - "type": "string" - }, - "serverStartDate": { + "expireAt": { "type": "string", "format": "date-time" - }, - "objectDetails": { - "allOf": [ - { - "$ref": "#/components/schemas/Record_string.any_" - } - ], - "nullable": true } }, "required": [ "_id", - "resourceName", - "crudType" + "count", + "createdAt", + "expireAt" ], "type": "object", "additionalProperties": false }, - "GetAuditLogsResponse": { + "GetCachedNotificationCountResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "auditLogs": { - "items": { - "$ref": "#/components/schemas/APIAuditLog" - }, - "type": "array" + "data": { + "$ref": "#/components/schemas/UserNotificationCount" } }, "required": [ "status", - "auditLogs" + "data" ], "type": "object", "additionalProperties": false }, - "SORT_DIR": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - }, - "DistinctAccumulator": { - "$ref": "#/components/schemas/Record_string.number_" - }, - "GroupValues": { - "$ref": "#/components/schemas/Record_string.string_" - }, - "AggregationValue": { + "Moderator": { "properties": { - "groups": { - "$ref": "#/components/schemas/GroupValues" + "_id": { + "type": "string" }, - "stringValue": { + "tenantId": { "type": "string" }, - "numericValue": { + "name": { + "type": "string", + "nullable": true + }, + "userId": { + "type": "string", + "nullable": true + }, + "acceptedInvite": { + "type": "boolean" + }, + "email": { + "type": "string", + "nullable": true + }, + "markReviewedCount": { "type": "number", "format": "double" }, - "distinctCount": { - "type": "integer", - "format": "int64" + "deletedCount": { + "type": "number", + "format": "double" }, - "distinctCounts": { - "$ref": "#/components/schemas/DistinctAccumulator" - } - }, - "type": "object" - }, - "Record_string.AggregationValue_": { - "properties": {}, - "additionalProperties": { - "$ref": "#/components/schemas/AggregationValue" + "markedSpamCount": { + "type": "number", + "format": "double" + }, + "markedNotSpamCount": { + "type": "number", + "format": "double" + }, + "approvedCount": { + "type": "number", + "format": "double" + }, + "unApprovedCount": { + "type": "number", + "format": "double" + }, + "editedCount": { + "type": "number", + "format": "double" + }, + "bannedCount": { + "type": "number", + "format": "double" + }, + "unFlaggedCount": { + "type": "number", + "format": "double" + }, + "verificationId": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "moderationGroupIds": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "isEmailSuppressed": { + "type": "boolean" + } }, + "required": [ + "_id", + "tenantId", + "name", + "userId", + "acceptedInvite", + "email", + "markReviewedCount", + "deletedCount", + "markedSpamCount", + "markedNotSpamCount", + "approvedCount", + "unApprovedCount", + "editedCount", + "bannedCount", + "unFlaggedCount", + "verificationId", + "createdAt", + "moderationGroupIds" + ], "type": "object", - "description": "Construct a type with a set of properties K of type T" + "additionalProperties": false }, - "AggregationItem": { - "allOf": [ - { - "$ref": "#/components/schemas/Record_string.AggregationValue_" + "GetModeratorResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" }, - { - "properties": { - "groups": { - "$ref": "#/components/schemas/GroupValues" - } - }, - "type": "object" + "moderator": { + "$ref": "#/components/schemas/Moderator" } - ] + }, + "required": [ + "status", + "moderator" + ], + "type": "object", + "additionalProperties": false }, - "AggregationResponse": { - "description": "The API response returns the aggregated data along with simple stats", + "GetModeratorsResponse": { "properties": { "status": { "$ref": "#/components/schemas/APIStatus" }, - "data": { + "moderators": { "items": { - "$ref": "#/components/schemas/AggregationItem" + "$ref": "#/components/schemas/Moderator" }, "type": "array" - }, - "stats": { - "properties": { - "timeMS": { - "type": "integer", - "format": "int64" - }, - "scanned": { - "type": "integer", - "format": "int64" - } - }, - "required": [ - "timeMS", - "scanned" - ], - "type": "object" } }, "required": [ "status", - "data" + "moderators" ], "type": "object", "additionalProperties": false }, - "QueryPredicate": { + "CreateModeratorResponse": { "properties": { - "key": { - "type": "string" - }, - "value": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number", - "format": "double" - }, - { - "type": "boolean" - } - ] + "status": { + "$ref": "#/components/schemas/APIStatus" }, - "operator": { - "type": "string", - "enum": [ - "eq", - "not_eq", - "greater_than", - "less_than", - "contains" - ] + "moderator": { + "$ref": "#/components/schemas/Moderator" } }, "required": [ - "key", - "value", - "operator" + "status", + "moderator" ], "type": "object", "additionalProperties": false }, - "AggregationOpType": { - "type": "string", - "enum": [ - "sum", - "countDistinct", - "distinct", - "avg", - "min", - "max", - "count" - ], - "description": "The supported aggregation operation types" - }, - "AggregationOperation": { - "description": "An operation that will be applied on a field", + "CreateModeratorBody": { "properties": { - "field": { - "type": "string", - "description": "The field to operate on" + "name": { + "type": "string" }, - "op": { - "$ref": "#/components/schemas/AggregationOpType", - "description": "The type of operation" + "email": { + "type": "string" }, - "alias": { - "type": "string", - "description": "Optional alias for the output; if not provided, a default alias is computed" + "userId": { + "type": "string" }, - "expandArray": { - "type": "boolean" + "moderationGroupIds": { + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ - "field", - "op" + "name", + "email" ], "type": "object", - "additionalProperties": false + "additionalProperties": {} }, - "AggregationRequest": { - "description": "The aggregation request accepts a resource, optional grouping keys, an array of operations, and an optional sort", + "UpdateModeratorBody": { "properties": { - "query": { - "items": { - "$ref": "#/components/schemas/QueryPredicate" - }, - "type": "array" + "name": { + "type": "string" }, - "resourceName": { + "email": { "type": "string" }, - "groupBy": { - "items": { - "type": "string" - }, - "type": "array" + "userId": { + "type": "string" }, - "operations": { + "moderationGroupIds": { "items": { - "$ref": "#/components/schemas/AggregationOperation" + "type": "string" }, "type": "array" - }, - "sort": { - "properties": { - "dir": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "field": { - "type": "string" - } - }, - "required": [ - "dir", - "field" - ], - "type": "object" } }, - "required": [ - "resourceName", - "operations" - ], "type": "object", - "additionalProperties": false - } - }, - "securitySchemes": { - "api_key": { - "type": "apiKey", - "name": "x-api-key", - "in": "header" + "additionalProperties": {} + }, + "TenantHashTag": { + "properties": { + "_id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "tenantId": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "_id", + "createdAt", + "tenantId", + "tag" + ], + "type": "object", + "additionalProperties": false + }, + "GetHashTagsResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "hashTags": { + "items": { + "$ref": "#/components/schemas/TenantHashTag" + }, + "type": "array" + } + }, + "required": [ + "status", + "hashTags" + ], + "type": "object", + "additionalProperties": false + }, + "CreateHashTagResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "hashTag": { + "$ref": "#/components/schemas/TenantHashTag" + } + }, + "required": [ + "status", + "hashTag" + ], + "type": "object", + "additionalProperties": false + }, + "CreateHashTagBody": { + "properties": { + "tenantId": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "tag" + ], + "type": "object", + "additionalProperties": false + }, + "BulkCreateHashTagsResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "results": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/CreateHashTagResponse" + }, + { + "$ref": "#/components/schemas/APIError" + } + ] + }, + "type": "array" + } + }, + "required": [ + "status", + "results" + ], + "type": "object", + "additionalProperties": false + }, + "BulkCreateHashTagsBody": { + "properties": { + "tenantId": { + "type": "string" + }, + "tags": { + "items": { + "properties": { + "url": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "required": [ + "tag" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "tags" + ], + "type": "object", + "additionalProperties": false + }, + "UpdateHashTagResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "hashTag": { + "$ref": "#/components/schemas/TenantHashTag" + } + }, + "required": [ + "status", + "hashTag" + ], + "type": "object", + "additionalProperties": false + }, + "UpdateHashTagBody": { + "properties": { + "tenantId": { + "type": "string" + }, + "url": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "GetFeedPostsResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "feedPosts": { + "items": { + "$ref": "#/components/schemas/FeedPost" + }, + "type": "array" + } + }, + "required": [ + "status", + "feedPosts" + ], + "type": "object", + "additionalProperties": false + }, + "CreateFeedPostsResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "feedPost": { + "$ref": "#/components/schemas/FeedPost" + } + }, + "required": [ + "status", + "feedPost" + ], + "type": "object", + "additionalProperties": false + }, + "Record_string.unknown_": { + "properties": {}, + "additionalProperties": {}, + "type": "object", + "description": "Construct a type with a set of properties K of type T" + }, + "Record_string.Record_string.string__": { + "properties": {}, + "additionalProperties": { + "$ref": "#/components/schemas/Record_string.string_" + }, + "type": "object", + "description": "Construct a type with a set of properties K of type T" + }, + "EmailTemplateDefinition": { + "properties": { + "emailTemplateId": { + "type": "string" + }, + "defaultTestData": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "defaultTranslationsByLocale": { + "$ref": "#/components/schemas/Record_string.Record_string.string__" + }, + "defaultEJS": { + "type": "string" + } + }, + "required": [ + "emailTemplateId", + "defaultTestData", + "defaultTranslationsByLocale", + "defaultEJS" + ], + "type": "object", + "additionalProperties": false + }, + "GetEmailTemplateDefinitionsResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "definitions": { + "items": { + "$ref": "#/components/schemas/EmailTemplateDefinition" + }, + "type": "array" + } + }, + "required": [ + "status", + "definitions" + ], + "type": "object", + "additionalProperties": false + }, + "EmailTemplateRenderErrorResponse": { + "properties": { + "id": { + "type": "string" + }, + "tenantId": { + "type": "string" + }, + "customTemplateId": { + "type": "string" + }, + "error": { + "type": "string" + }, + "count": { + "type": "number", + "format": "double" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "lastOccurredAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "id", + "tenantId", + "customTemplateId", + "error", + "count", + "createdAt", + "lastOccurredAt" + ], + "type": "object", + "additionalProperties": false + }, + "GetEmailTemplateRenderErrorsResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "renderErrors": { + "items": { + "$ref": "#/components/schemas/EmailTemplateRenderErrorResponse" + }, + "type": "array" + } + }, + "required": [ + "status", + "renderErrors" + ], + "type": "object", + "additionalProperties": false + }, + "CustomEmailTemplate": { + "properties": { + "_id": { + "type": "string" + }, + "tenantId": { + "type": "string" + }, + "emailTemplateId": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updatedByUserId": { + "type": "string", + "nullable": true + }, + "domain": { + "type": "string", + "nullable": true + }, + "ejs": { + "type": "string" + }, + "translationOverridesByLocale": { + "$ref": "#/components/schemas/Record_string.Record_string.string__" + }, + "testData": {} + }, + "required": [ + "_id", + "tenantId", + "emailTemplateId", + "displayName", + "createdAt", + "updatedAt", + "updatedByUserId", + "ejs", + "translationOverridesByLocale", + "testData" + ], + "type": "object", + "additionalProperties": false + }, + "GetEmailTemplateResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "emailTemplate": { + "$ref": "#/components/schemas/CustomEmailTemplate" + } + }, + "required": [ + "status", + "emailTemplate" + ], + "type": "object", + "additionalProperties": false + }, + "GetEmailTemplatesResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "emailTemplates": { + "items": { + "$ref": "#/components/schemas/CustomEmailTemplate" + }, + "type": "array" + } + }, + "required": [ + "status", + "emailTemplates" + ], + "type": "object", + "additionalProperties": false + }, + "CreateEmailTemplateResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "emailTemplate": { + "$ref": "#/components/schemas/CustomEmailTemplate" + } + }, + "required": [ + "status", + "emailTemplate" + ], + "type": "object", + "additionalProperties": false + }, + "CreateEmailTemplateBody": { + "properties": { + "emailTemplateId": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "ejs": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "translationOverridesByLocale": { + "$ref": "#/components/schemas/Record_string.Record_string.string__" + }, + "testData": { + "$ref": "#/components/schemas/Record_string.unknown_" + } + }, + "required": [ + "emailTemplateId", + "displayName", + "ejs" + ], + "type": "object", + "additionalProperties": false + }, + "UpdateEmailTemplateBody": { + "properties": { + "emailTemplateId": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "ejs": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "translationOverridesByLocale": { + "$ref": "#/components/schemas/Record_string.Record_string.string__" + }, + "testData": { + "$ref": "#/components/schemas/Record_string.unknown_" + } + }, + "type": "object", + "additionalProperties": false + }, + "RenderEmailTemplateResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "html": { + "type": "string" + } + }, + "required": [ + "status", + "html" + ], + "type": "object", + "additionalProperties": false + }, + "RenderEmailTemplateBody": { + "properties": { + "emailTemplateId": { + "type": "string" + }, + "ejs": { + "type": "string" + }, + "testData": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "translationOverridesByLocale": { + "$ref": "#/components/schemas/Record_string.Record_string.string__" + } + }, + "required": [ + "emailTemplateId", + "ejs" + ], + "type": "object", + "additionalProperties": false + }, + "AddDomainConfigParams": { + "properties": { + "domain": { + "type": "string" + }, + "emailFromName": { + "type": "string" + }, + "emailFromEmail": { + "type": "string" + }, + "logoSrc": { + "type": "string" + }, + "logoSrc100px": { + "type": "string" + }, + "footerUnsubscribeURL": { + "type": "string" + }, + "emailHeaders": { + "$ref": "#/components/schemas/Record_string.string_" + } + }, + "required": [ + "domain" + ], + "type": "object", + "additionalProperties": false + }, + "UpdateDomainConfigParams": { + "properties": { + "domain": { + "type": "string" + }, + "emailFromName": { + "type": "string" + }, + "emailFromEmail": { + "type": "string" + }, + "logoSrc": { + "type": "string" + }, + "logoSrc100px": { + "type": "string" + }, + "footerUnsubscribeURL": { + "type": "string" + }, + "emailHeaders": { + "$ref": "#/components/schemas/Record_string.string_" + } + }, + "required": [ + "domain" + ], + "type": "object", + "additionalProperties": false + }, + "PatchDomainConfigParams": { + "properties": { + "domain": { + "type": "string" + }, + "emailFromName": { + "type": "string" + }, + "emailFromEmail": { + "type": "string" + }, + "logoSrc": { + "type": "string" + }, + "logoSrc100px": { + "type": "string" + }, + "footerUnsubscribeURL": { + "type": "string" + }, + "emailHeaders": { + "$ref": "#/components/schemas/Record_string.string_" + } + }, + "type": "object", + "additionalProperties": false + }, + "APICommentBase": { + "properties": { + "id": { + "type": "string" + }, + "aiDeterminedSpam": { + "type": "boolean" + }, + "anonUserId": { + "type": "string", + "nullable": true + }, + "approved": { + "type": "boolean" + }, + "avatarSrc": { + "type": "string", + "nullable": true + }, + "badges": { + "items": { + "$ref": "#/components/schemas/CommentUserBadgeInfo" + }, + "type": "array", + "nullable": true + }, + "comment": { + "type": "string" + }, + "commentHTML": { + "type": "string" + }, + "commenterEmail": { + "type": "string", + "nullable": true + }, + "commenterLink": { + "type": "string", + "nullable": true + }, + "commenterName": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "displayLabel": { + "type": "string", + "nullable": true + }, + "domain": { + "allOf": [ + { + "$ref": "#/components/schemas/FDomain" + } + ], + "nullable": true + }, + "externalId": { + "type": "string" + }, + "externalParentId": { + "type": "string", + "nullable": true + }, + "expireAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "feedbackIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "flagCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "fromProductId": { + "type": "integer", + "format": "int32" + }, + "hasCode": { + "type": "boolean" + }, + "hasImages": { + "type": "boolean" + }, + "hasLinks": { + "type": "boolean" + }, + "hashTags": { + "items": { + "$ref": "#/components/schemas/CommentUserHashTagInfo" + }, + "type": "array" + }, + "isByAdmin": { + "type": "boolean" + }, + "isByModerator": { + "type": "boolean" + }, + "isDeleted": { + "type": "boolean" + }, + "isDeletedUser": { + "type": "boolean" + }, + "isPinned": { + "type": "boolean", + "nullable": true + }, + "isLocked": { + "type": "boolean", + "nullable": true + }, + "isSpam": { + "type": "boolean" + }, + "localDateHours": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "localDateString": { + "type": "string", + "nullable": true + }, + "locale": { + "type": "string", + "nullable": true + }, + "mentions": { + "items": { + "$ref": "#/components/schemas/CommentUserMentionInfo" + }, + "type": "array" + }, + "meta": { + "properties": { + "wpUserId": { + "type": "string" + }, + "wpPostId": { + "type": "string" + } + }, + "additionalProperties": {}, + "type": "object", + "nullable": true + }, + "moderationGroupIds": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "notificationSentForParent": { + "type": "boolean" + }, + "notificationSentForParentTenant": { + "type": "boolean" + }, + "pageTitle": { + "type": "string", + "nullable": true + }, + "parentId": { + "type": "string", + "nullable": true + }, + "rating": { + "type": "number", + "format": "double", + "nullable": true + }, + "reviewed": { + "type": "boolean" + }, + "tenantId": { + "type": "string" + }, + "url": { + "type": "string" + }, + "urlId": { + "type": "string" + }, + "urlIdRaw": { + "type": "string" + }, + "userId": { + "allOf": [ + { + "$ref": "#/components/schemas/UserId" + } + ], + "nullable": true + }, + "verified": { + "type": "boolean" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "votes": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "votesDown": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "votesUp": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "required": [ + "id", + "approved", + "comment", + "commentHTML", + "commenterName", + "date", + "locale", + "tenantId", + "url", + "urlId", + "verified" + ], + "type": "object", + "additionalProperties": false + }, + "APIComment": { + "allOf": [ + { + "$ref": "#/components/schemas/APICommentBase" + }, + { + "properties": { + "date": { + "type": "number", + "format": "double", + "nullable": true + } + }, + "required": [ + "date" + ], + "type": "object" + } + ] + }, + "APIGetCommentResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "comment": { + "$ref": "#/components/schemas/APIComment" + } + }, + "required": [ + "status", + "comment" + ], + "type": "object", + "additionalProperties": false + }, + "APIGetCommentsResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "comments": { + "items": { + "$ref": "#/components/schemas/APIComment" + }, + "type": "array" + } + }, + "required": [ + "status", + "comments" + ], + "type": "object", + "additionalProperties": false + }, + "UpdatableCommentParams": { + "properties": { + "urlId": { + "type": "string" + }, + "urlIdRaw": { + "type": "string" + }, + "url": { + "type": "string" + }, + "pageTitle": { + "type": "string", + "nullable": true + }, + "userId": { + "allOf": [ + { + "$ref": "#/components/schemas/UserId" + } + ], + "nullable": true + }, + "commenterEmail": { + "type": "string", + "nullable": true + }, + "commenterName": { + "type": "string" + }, + "commenterLink": { + "type": "string", + "nullable": true + }, + "comment": { + "type": "string" + }, + "commentHTML": { + "type": "string" + }, + "parentId": { + "type": "string", + "nullable": true + }, + "date": { + "type": "number", + "format": "double", + "nullable": true + }, + "localDateString": { + "type": "string", + "nullable": true + }, + "localDateHours": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "votes": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "votesUp": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "votesDown": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "expireAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "verified": { + "type": "boolean" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "notificationSentForParent": { + "type": "boolean" + }, + "notificationSentForParentTenant": { + "type": "boolean" + }, + "reviewed": { + "type": "boolean" + }, + "externalId": { + "type": "string" + }, + "externalParentId": { + "type": "string", + "nullable": true + }, + "avatarSrc": { + "type": "string", + "nullable": true + }, + "isSpam": { + "type": "boolean" + }, + "approved": { + "type": "boolean" + }, + "isDeleted": { + "type": "boolean" + }, + "isDeletedUser": { + "type": "boolean" + }, + "isByAdmin": { + "type": "boolean" + }, + "isByModerator": { + "type": "boolean" + }, + "isPinned": { + "type": "boolean", + "nullable": true + }, + "isLocked": { + "type": "boolean", + "nullable": true + }, + "flagCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "displayLabel": { + "type": "string", + "nullable": true + }, + "meta": { + "properties": { + "wpUserId": { + "type": "string" + }, + "wpPostId": { + "type": "string" + } + }, + "additionalProperties": {}, + "type": "object", + "nullable": true + }, + "moderationGroupIds": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "feedbackIds": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "APISaveCommentResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "comment": { + "$ref": "#/components/schemas/APIComment" + }, + "user": { + "allOf": [ + { + "$ref": "#/components/schemas/UserSessionInfo" + } + ], + "nullable": true + }, + "moduleData": { + "$ref": "#/components/schemas/Record_string.any_" + } + }, + "required": [ + "status", + "comment", + "user" + ], + "type": "object", + "additionalProperties": false + }, + "CreateCommentParams": { + "properties": { + "date": { + "type": "integer", + "format": "int64" + }, + "localDateString": { + "type": "string" + }, + "localDateHours": { + "type": "integer", + "format": "int32" + }, + "commenterName": { + "type": "string" + }, + "commenterEmail": { + "type": "string", + "nullable": true + }, + "commenterLink": { + "type": "string", + "nullable": true + }, + "comment": { + "type": "string" + }, + "productId": { + "type": "integer", + "format": "int32" + }, + "userId": { + "type": "string", + "nullable": true + }, + "avatarSrc": { + "type": "string", + "nullable": true + }, + "parentId": { + "type": "string", + "nullable": true + }, + "mentions": { + "items": { + "$ref": "#/components/schemas/CommentUserMentionInfo" + }, + "type": "array" + }, + "hashTags": { + "items": { + "$ref": "#/components/schemas/CommentUserHashTagInfo" + }, + "type": "array" + }, + "pageTitle": { + "type": "string" + }, + "isFromMyAccountPage": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "urlId": { + "type": "string" + }, + "meta": { + "additionalProperties": false, + "type": "object" + }, + "moderationGroupIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "rating": { + "type": "number", + "format": "double" + }, + "fromOfflineRestore": { + "type": "boolean" + }, + "autoplayDelayMS": { + "type": "integer", + "format": "int64" + }, + "feedbackIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "questionValues": { + "$ref": "#/components/schemas/Record_string.string-or-number_" + }, + "tos": { + "type": "boolean" + }, + "botId": { + "type": "string" + }, + "approved": { + "type": "boolean" + }, + "domain": { + "type": "string" + }, + "ip": { + "type": "string" + }, + "isPinned": { + "type": "boolean" + }, + "locale": { + "type": "string", + "description": "Example: en_us" + }, + "reviewed": { + "type": "boolean" + }, + "verified": { + "type": "boolean" + }, + "votes": { + "type": "integer", + "format": "int32" + }, + "votesDown": { + "type": "integer", + "format": "int32" + }, + "votesUp": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "commenterName", + "comment", + "url", + "urlId", + "locale" + ], + "type": "object", + "additionalProperties": false + }, + "FlagCommentResponse": { + "properties": { + "statusCode": { + "type": "integer", + "format": "int32" + }, + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "code": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "wasUnapproved": { + "type": "boolean" + } + }, + "required": [ + "status" + ], + "type": "object", + "additionalProperties": false + }, + "BlockFromCommentParams": { + "properties": { + "commentIdsToCheck": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "UnBlockFromCommentParams": { + "properties": { + "commentIdsToCheck": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "APIAuditLog": { + "properties": { + "_id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "username": { + "type": "string" + }, + "resourceName": { + "type": "string" + }, + "crudType": { + "type": "string", + "enum": [ + "c", + "r", + "u", + "d", + "login" + ] + }, + "from": { + "type": "string", + "enum": [ + "ui", + "api", + "cron" + ] + }, + "url": { + "type": "string", + "nullable": true + }, + "ip": { + "type": "string", + "nullable": true + }, + "when": { + "type": "string", + "format": "date-time" + }, + "description": { + "type": "string" + }, + "serverStartDate": { + "type": "string", + "format": "date-time" + }, + "objectDetails": { + "allOf": [ + { + "$ref": "#/components/schemas/Record_string.any_" + } + ], + "nullable": true + } + }, + "required": [ + "_id", + "resourceName", + "crudType" + ], + "type": "object", + "additionalProperties": false + }, + "GetAuditLogsResponse": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "auditLogs": { + "items": { + "$ref": "#/components/schemas/APIAuditLog" + }, + "type": "array" + } + }, + "required": [ + "status", + "auditLogs" + ], + "type": "object", + "additionalProperties": false + }, + "SORT_DIR": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + }, + "DistinctAccumulator": { + "$ref": "#/components/schemas/Record_string.number_" + }, + "GroupValues": { + "$ref": "#/components/schemas/Record_string.string_" + }, + "AggregationValue": { + "properties": { + "groups": { + "$ref": "#/components/schemas/GroupValues" + }, + "stringValue": { + "type": "string" + }, + "numericValue": { + "type": "number", + "format": "double" + }, + "distinctCount": { + "type": "integer", + "format": "int64" + }, + "distinctCounts": { + "$ref": "#/components/schemas/DistinctAccumulator" + } + }, + "type": "object" + }, + "Record_string.AggregationValue_": { + "properties": {}, + "additionalProperties": { + "$ref": "#/components/schemas/AggregationValue" + }, + "type": "object", + "description": "Construct a type with a set of properties K of type T" + }, + "AggregationItem": { + "allOf": [ + { + "$ref": "#/components/schemas/Record_string.AggregationValue_" + }, + { + "properties": { + "groups": { + "$ref": "#/components/schemas/GroupValues" + } + }, + "type": "object" + } + ] + }, + "AggregationResponse": { + "description": "The API response returns the aggregated data along with simple stats", + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "data": { + "items": { + "$ref": "#/components/schemas/AggregationItem" + }, + "type": "array" + }, + "stats": { + "properties": { + "timeMS": { + "type": "integer", + "format": "int64" + }, + "scanned": { + "type": "integer", + "format": "int64" + } + }, + "required": [ + "timeMS", + "scanned" + ], + "type": "object" + } + }, + "required": [ + "status", + "data" + ], + "type": "object", + "additionalProperties": false + }, + "AggregationAPIError": { + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" + }, + "reason": { + "type": "string" + }, + "code": { + "type": "string" + }, + "validResourceNames": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "status", + "reason", + "code" + ], + "type": "object", + "additionalProperties": false + }, + "QueryPredicate": { + "properties": { + "key": { + "type": "string" + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number", + "format": "double" + }, + { + "type": "boolean" + } + ] + }, + "operator": { + "type": "string", + "enum": [ + "eq", + "not_eq", + "greater_than", + "less_than", + "contains" + ] + } + }, + "required": [ + "key", + "value", + "operator" + ], + "type": "object", + "additionalProperties": false + }, + "AggregationOpType": { + "type": "string", + "enum": [ + "sum", + "countDistinct", + "distinct", + "avg", + "min", + "max", + "count" + ], + "description": "The supported aggregation operation types" + }, + "AggregationOperation": { + "description": "An operation that will be applied on a field", + "properties": { + "field": { + "type": "string", + "description": "The field to operate on" + }, + "op": { + "$ref": "#/components/schemas/AggregationOpType", + "description": "The type of operation" + }, + "alias": { + "type": "string", + "description": "Optional alias for the output; if not provided, a default alias is computed" + }, + "expandArray": { + "type": "boolean" + } + }, + "required": [ + "field", + "op" + ], + "type": "object", + "additionalProperties": false + }, + "AggregationRequest": { + "description": "The aggregation request accepts a resource, optional grouping keys, an array of operations, and an optional sort", + "properties": { + "query": { + "items": { + "$ref": "#/components/schemas/QueryPredicate" + }, + "type": "array" + }, + "resourceName": { + "type": "string" + }, + "groupBy": { + "items": { + "type": "string" + }, + "type": "array" + }, + "operations": { + "items": { + "$ref": "#/components/schemas/AggregationOperation" + }, + "type": "array" + }, + "sort": { + "properties": { + "dir": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "field": { + "type": "string" + } + }, + "required": [ + "dir", + "field" + ], + "type": "object" + } + }, + "required": [ + "resourceName", + "operations" + ], + "type": "object", + "additionalProperties": false + } + }, + "securitySchemes": { + "api_key": { + "type": "apiKey", + "name": "x-api-key", + "in": "header" + } + } + }, + "info": { + "title": "fastcomments", + "version": "0.0.0", + "contact": {} + }, + "paths": { + "/user-search/{tenantId}": { + "get": { + "operationId": "SearchUsers", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchUsersResult" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "usernameStartsWith", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "mentionGroupIds", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "searchSection", + "required": false, + "schema": { + "type": "string", + "enum": [ + "fast", + "site" + ] + } + } + ] + } + }, + "/user-presence-status": { + "get": { + "operationId": "GetUserPresenceStatuses", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUserPresenceStatusesResponse" + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "urlIdWS", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "userIds", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/user-notifications": { + "get": { + "operationId": "GetUserNotifications", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMyNotificationsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Used to determine whether the current page is subscribed.", + "in": "query", + "name": "urlId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "afterId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "includeContext", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "afterCreatedAt", + "required": false, + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "in": "query", + "name": "unreadOnly", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "dmOnly", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "noDm", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "includeTranslations", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "includeTenantNotifications", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/user-notifications/reset": { + "post": { + "operationId": "ResetUserNotifications", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetUserNotificationsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "afterId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "afterCreatedAt", + "required": false, + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "in": "query", + "name": "unreadOnly", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "dmOnly", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "noDm", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/user-notifications/get-count": { + "get": { + "operationId": "GetUserNotificationCount", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUserNotificationCountResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/user-notifications/reset-count": { + "post": { + "operationId": "ResetUserNotificationCount", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetUserNotificationsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/user-notifications/{notificationId}/mark/{newStatus}": { + "post": { + "operationId": "UpdateUserNotificationStatus", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "title": "UpdateUserNotificationStatusResponse", + "anyOf": [ + { + "$ref": "#/components/schemas/UserNotificationWriteResponse" + }, + { + "$ref": "#/components/schemas/IgnoredResponse" + } + ] + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "notificationId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "newStatus", + "required": true, + "schema": { + "type": "string", + "enum": [ + "read", + "unread" + ] + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/user-notifications/{notificationId}/mark-opted/{optedInOrOut}": { + "post": { + "operationId": "UpdateUserNotificationCommentSubscriptionStatus", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "title": "UpdateUserNotificationCommentSubscriptionStatusResponse", + "anyOf": [ + { + "$ref": "#/components/schemas/UserNotificationWriteResponse" + }, + { + "$ref": "#/components/schemas/IgnoredResponse" + } + ] + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "description": "Enable or disable notifications for a specific comment.", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "notificationId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "optedInOrOut", + "required": true, + "schema": { + "type": "string", + "enum": [ + "in", + "out" + ] + } + }, + { + "in": "query", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/user-notifications/set-subscription-state/{subscribedOrUnsubscribed}": { + "post": { + "operationId": "UpdateUserNotificationPageSubscriptionStatus", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "title": "UpdateUserNotificationPageSubscriptionStatusResponse", + "anyOf": [ + { + "$ref": "#/components/schemas/UserNotificationWriteResponse" + }, + { + "$ref": "#/components/schemas/IgnoredResponse" + } + ] + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "description": "Enable or disable notifications for a page. When users are subscribed to a page, notifications are created\nfor new root comments, and also", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "url", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "pageTitle", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "subscribedOrUnsubscribed", + "required": true, + "schema": { + "type": "string", + "enum": [ + "subscribe", + "unsubscribe" + ] + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/upload-image/{tenantId}": { + "post": { + "operationId": "UploadImage", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UploadImageResponse" + } + } + } + } + }, + "description": "Upload and resize an image", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Size preset: \"Default\" (1000x1000px) or \"CrossPlatform\" (creates sizes for popular devices)", + "in": "query", + "name": "sizePreset", + "required": false, + "schema": { + "$ref": "#/components/schemas/SizePreset" + } + }, + { + "description": "Page id that upload is happening from, to configure", + "in": "query", + "name": "urlId", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + }, + "required": [ + "file" + ] + } + } + } + } + } + }, + "/translations/{namespace}/{component}": { + "get": { + "operationId": "GetTranslations", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTranslationsResponse" + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "500": { + "description": "Internal", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "namespace", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "component", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "locale", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "useFullTranslationIds", + "required": false, + "schema": { + "type": "boolean" + } + } + ] + } + }, + "/pages/{tenantId}": { + "get": { + "operationId": "GetPagesPublic", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetPublicPagesResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "description": "List pages for a tenant. Used by the FChat desktop client to populate its room list.\nRequires `enableFChat` to be true on the resolved custom config for each page.\nPages that require SSO are filtered against the requesting user's group access.", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Opaque pagination cursor returned as `nextCursor` from a prior request. Tied to the same `sortBy`.", + "in": "query", + "name": "cursor", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "1..200, default 50", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "description": "Optional case-insensitive title prefix filter.", + "in": "query", + "name": "q", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Sort order. `updatedAt` (default, newest first), `commentCount` (most comments first), or `title` (alphabetical).", + "in": "query", + "name": "sortBy", + "required": false, + "schema": { + "$ref": "#/components/schemas/PagesSortBy" + } + }, + { + "description": "If true, only return pages with at least one comment.", + "in": "query", + "name": "hasComments", + "required": false, + "schema": { + "type": "boolean" + } + } + ] + } + }, + "/pages/{tenantId}/users/online": { + "get": { + "operationId": "GetOnlineUsers", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageUsersOnlineResponse" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "description": "Currently-online viewers of a page: people whose websocket session is subscribed to the page right now.\nReturns anonCount + totalCount (room-wide subscribers, including anon viewers we don't enumerate).", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Page URL identifier (cleaned server-side).", + "in": "query", + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Cursor: pass nextAfterName from the previous response.", + "in": "query", + "name": "afterName", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Cursor tiebreaker: pass nextAfterUserId from the previous response. Required when afterName is set so name-ties don't drop entries.", + "in": "query", + "name": "afterUserId", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/pages/{tenantId}/users/offline": { + "get": { + "operationId": "GetOfflineUsers", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageUsersOfflineResponse" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "description": "Past commenters on the page who are NOT currently online. Sorted by displayName.\nUse this after exhausting /users/online to render a \"Members\" section.\nCursor pagination on commenterName: server walks the partial {tenantId, urlId, commenterName}\nindex from afterName forward via $gt, no $skip cost.", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Page URL identifier (cleaned server-side).", + "in": "query", + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Cursor: pass nextAfterName from the previous response.", + "in": "query", + "name": "afterName", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Cursor tiebreaker: pass nextAfterUserId from the previous response. Required when afterName is set so name-ties don't drop entries.", + "in": "query", + "name": "afterUserId", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/pages/{tenantId}/users/info": { + "get": { + "operationId": "GetUsersInfo", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageUsersInfoResponse" + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "description": "Bulk user info for a tenant. Given userIds, return display info from User / SSOUser.\nUsed by the comment widget to enrich users that just appeared via a presence event.\nNo page context: privacy is enforced uniformly (private profiles are masked).", + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Comma-delimited userIds.", + "in": "query", + "name": "ids", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/page-reacts/v1/likes/{tenantId}": { + "get": { + "operationId": "GetV1PageLikes", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetV1PageLikes" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "post": { + "operationId": "CreateV1PageReact", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateV1PageReact" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "title", + "required": false, + "schema": { + "type": "string" + } + } + ] + }, + "delete": { + "operationId": "DeleteV1PageReact", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteV1PageReact" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/page-reacts/v2/{tenantId}/list": { + "get": { + "operationId": "GetV2PageReactUsers", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetV2PageReactUsersResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/page-reacts/v2/{tenantId}": { + "get": { + "operationId": "GetV2PageReacts", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetV2PageReacts" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "post": { + "operationId": "CreateV2PageReact", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateV2PageReact" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "title", + "required": false, + "schema": { + "type": "string" + } + } + ] + }, + "delete": { + "operationId": "DeleteV2PageReact", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteV2PageReact" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "urlId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/count": { + "get": { + "operationId": "GetCount", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModerationAPICountCommentsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "text-search", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "byIPFromComment", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "filter", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "searchFilters", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "demo", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/api/ids": { + "get": { + "operationId": "GetApiIds", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModerationAPIGetCommentIdsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "text-search", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "byIPFromComment", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "filters", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "searchFilters", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "afterId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "demo", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/api/comments": { + "get": { + "operationId": "GetApiComments", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModerationAPIGetCommentsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "double", + "type": "number" + } + }, + { + "in": "query", + "name": "count", + "required": false, + "schema": { + "format": "double", + "type": "number" + } + }, + { + "in": "query", + "name": "text-search", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "byIPFromComment", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "filters", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "searchFilters", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sorts", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "demo", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/api/export": { + "post": { + "operationId": "PostApiExport", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModerationExportResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "text-search", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "byIPFromComment", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "filters", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "searchFilters", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sorts", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/api/export/status": { + "get": { + "operationId": "GetApiExportStatus", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModerationExportStatusResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "batchJobId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/search/users": { + "get": { + "operationId": "GetSearchUsers", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModerationUserSearchResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "value", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/search/pages": { + "get": { + "operationId": "GetSearchPages", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModerationPageSearchResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "value", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/search/sites": { + "get": { + "operationId": "GetSearchSites", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModerationSiteSearchResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "value", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/search/comments/summary": { + "get": { + "operationId": "GetSearchCommentsSummary", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModerationCommentSearchResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "value", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "filters", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "searchFilters", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/search/suggest": { + "get": { + "operationId": "GetSearchSuggest", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModerationSuggestResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "text-search", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/pre-ban-summary/{commentId}": { + "get": { + "operationId": "GetPreBanSummary", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreBanSummary" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "includeByUserIdAndEmail", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "includeByIP", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "includeByEmailDomain", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/bulk-pre-ban-summary": { + "post": { + "operationId": "PostBulkPreBanSummary", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkPreBanSummary" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "includeByUserIdAndEmail", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "includeByIP", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "includeByEmailDomain", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkPreBanParams" + } + } + } + } + } + }, + "/auth/my-account/moderate-comments/ban-user/from-comment/{commentId}": { + "post": { + "operationId": "PostBanUserFromComment", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BanUserFromCommentResult" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "banEmail", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "banEmailDomain", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "banIP", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "deleteAllUsersComments", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "bannedUntil", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "isShadowBan", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "updateId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "banReason", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/ban-users/from-comment/{commentId}": { + "get": { + "operationId": "GetBanUsersFromComment", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetBannedUsersFromCommentResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/ban-user/undo": { + "post": { + "operationId": "PostBanUserUndo", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BanUserUndoParams" + } + } + } + } + } + }, + "/auth/my-account/moderate-comments/remove-comment/{commentId}": { + "post": { + "operationId": "PostRemoveComment", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "title": "PostRemoveCommentResponse", + "anyOf": [ + { + "$ref": "#/components/schemas/DeleteCommentResult" + }, + { + "$ref": "#/components/schemas/RemoveCommentActionResponse" + } + ] + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/restore-deleted-comment/{commentId}": { + "post": { + "operationId": "PostRestoreDeletedComment", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/flag-comment/{commentId}": { + "post": { + "operationId": "PostFlagComment", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/un-flag-comment/{commentId}": { + "post": { + "operationId": "PostUnFlagComment", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/set-comment-review-status/{commentId}": { + "post": { + "operationId": "PostSetCommentReviewStatus", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "reviewed", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/set-comment-spam-status/{commentId}": { + "post": { + "operationId": "PostSetCommentSpamStatus", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "spam", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "permNotSpam", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/set-comment-approval-status/{commentId}": { + "post": { + "operationId": "PostSetCommentApprovalStatus", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetCommentApprovedResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "approved", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/logs/{commentId}": { + "get": { + "operationId": "GetLogs", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModerationAPIGetLogsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/comment/{commentId}": { + "get": { + "operationId": "GetModerationComment", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModerationAPICommentResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "includeEmail", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "includeIP", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/comments-by-ids": { + "post": { + "operationId": "PostCommentsByIds", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModerationAPIChildCommentsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentsByIdsParams" + } + } + } + } + } + }, + "/auth/my-account/moderate-comments/comment-children/{commentId}": { + "get": { + "operationId": "GetCommentChildren", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModerationAPIChildCommentsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/get-comment-text/{commentId}": { + "get": { + "operationId": "GetModerationCommentText", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCommentTextResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/set-comment-text/{commentId}": { + "post": { + "operationId": "PostSetCommentText", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetCommentTextResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetCommentTextParams" + } + } + } + } } - } - }, - "info": { - "title": "fastcomments", - "version": "0.0.0", - "contact": {} - }, - "paths": { - "/user-search/{tenantId}": { + }, + "/auth/my-account/moderate-comments/adjust-comment-votes/{commentId}": { + "post": { + "operationId": "PostAdjustCommentVotes", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdjustVotesResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdjustCommentVotesParams" + } + } + } + } + } + }, + "/auth/my-account/moderate-comments/vote/{commentId}": { + "post": { + "operationId": "PostVote", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoteResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "direction", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/vote/{commentId}/{voteId}": { + "delete": { + "operationId": "DeleteModerationVote", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoteDeleteResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "voteId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/get-comment-ban-status/{commentId}": { "get": { - "operationId": "SearchUsers", + "operationId": "GetCommentBanStatus", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/SearchUsersSectionedResponse" - }, - { - "$ref": "#/components/schemas/SearchUsersResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetCommentBanStatusResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/user-ban-preference": { + "get": { + "operationId": "GetUserBanPreference", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIModerateGetUserBanPreferencesResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } } }, "tags": [ - "Public" + "Moderation" ], "security": [], "parameters": [ - { - "in": "path", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "urlId", - "required": true, - "schema": { - "type": "string" - } - }, { "in": "query", - "name": "usernameStartsWith", + "name": "sso", "required": false, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "mentionGroupIds", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" + } + ] + } + }, + "/auth/my-account/moderate-comments/get-manual-badges": { + "get": { + "operationId": "GetManualBadges", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTenantManualBadgesResponse" + } } } }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ { "in": "query", "name": "sso", @@ -9623,45 +15141,26 @@ "schema": { "type": "string" } - }, - { - "in": "query", - "name": "searchSection", - "required": false, - "schema": { - "type": "string", - "enum": [ - "fast", - "site" - ] - } } ] } }, - "/user-presence-status": { + "/auth/my-account/moderate-comments/get-manual-badges-for-user": { "get": { - "operationId": "GetUserPresenceStatuses", + "operationId": "GetManualBadgesForUser", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetUserPresenceStatusesResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetUserManualBadgesResponse" } } } }, - "422": { - "description": "Validation Failed", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -9672,30 +15171,30 @@ } }, "tags": [ - "Public" + "Moderation" ], "security": [], "parameters": [ { "in": "query", - "name": "tenantId", - "required": true, + "name": "badgesUserId", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "urlIdWS", - "required": true, + "name": "commentId", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "userIds", - "required": true, + "name": "sso", + "required": false, "schema": { "type": "string" } @@ -9703,36 +15202,39 @@ ] } }, - "/user-notifications": { - "get": { - "operationId": "GetUserNotifications", + "/auth/my-account/moderate-comments/award-badge": { + "put": { + "operationId": "PutAwardBadge", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetMyNotificationsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/AwardUserBadgeResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } } }, "tags": [ - "Public" + "Moderation" ], "security": [], "parameters": [ { "in": "query", - "name": "tenantId", + "name": "badgeId", "required": true, "schema": { "type": "string" @@ -9740,16 +15242,15 @@ }, { "in": "query", - "name": "pageSize", + "name": "userId", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "afterId", + "name": "commentId", "required": false, "schema": { "type": "string" @@ -9757,51 +15258,83 @@ }, { "in": "query", - "name": "includeContext", + "name": "broadcastId", "required": false, "schema": { - "type": "boolean" + "type": "string" } }, { "in": "query", - "name": "afterCreatedAt", + "name": "sso", "required": false, "schema": { - "format": "int64", - "type": "integer" + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/remove-badge": { + "put": { + "operationId": "PutRemoveBadge", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RemoveUserBadgeResponse" + } + } } }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ { "in": "query", - "name": "unreadOnly", - "required": false, + "name": "badgeId", + "required": true, "schema": { - "type": "boolean" + "type": "string" } }, { "in": "query", - "name": "dmOnly", + "name": "userId", "required": false, "schema": { - "type": "boolean" + "type": "string" } }, { "in": "query", - "name": "noDm", + "name": "commentId", "required": false, "schema": { - "type": "boolean" + "type": "string" } }, { "in": "query", - "name": "includeTranslations", + "name": "broadcastId", "required": false, "schema": { - "type": "boolean" + "type": "string" } }, { @@ -9815,80 +15348,148 @@ ] } }, - "/user-notifications/reset": { - "post": { - "operationId": "ResetUserNotifications", + "/auth/my-account/moderate-comments/get-trust-factor": { + "get": { + "operationId": "GetTrustFactor", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResetUserNotificationsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetUserTrustFactorResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } } }, "tags": [ - "Public" + "Moderation" ], "security": [], "parameters": [ { "in": "query", - "name": "tenantId", - "required": true, + "name": "userId", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "afterId", + "name": "sso", "required": false, "schema": { "type": "string" } + } + ] + } + }, + "/auth/my-account/moderate-comments/set-trust-factor": { + "put": { + "operationId": "SetTrustFactor", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetUserTrustFactorResponse" + } + } + } }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ { "in": "query", - "name": "afterCreatedAt", + "name": "userId", "required": false, "schema": { - "format": "int64", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "unreadOnly", + "name": "trustFactor", "required": false, "schema": { - "type": "boolean" + "type": "string" } }, { "in": "query", - "name": "dmOnly", + "name": "sso", "required": false, "schema": { - "type": "boolean" + "type": "string" + } + } + ] + } + }, + "/auth/my-account/moderate-comments/get-user-internal-profile": { + "get": { + "operationId": "GetUserInternalProfile", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUserInternalProfileResponse" + } + } } }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Moderation" + ], + "security": [], + "parameters": [ { "in": "query", - "name": "noDm", + "name": "commentId", "required": false, "schema": { - "type": "boolean" + "type": "string" } }, { @@ -9902,36 +15503,39 @@ ] } }, - "/user-notifications/get-count": { - "get": { - "operationId": "GetUserNotificationCount", + "/auth/my-account/moderate-comments/reopen-thread": { + "put": { + "operationId": "PutReopenThread", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetUserNotificationCountResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } } }, "tags": [ - "Public" + "Moderation" ], "security": [], "parameters": [ { "in": "query", - "name": "tenantId", + "name": "urlId", "required": true, "schema": { "type": "string" @@ -9948,36 +15552,39 @@ ] } }, - "/user-notifications/reset-count": { - "post": { - "operationId": "ResetUserNotificationCount", + "/auth/my-account/moderate-comments/close-thread": { + "put": { + "operationId": "PutCloseThread", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResetUserNotificationsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } } }, "tags": [ - "Public" + "Moderation" ], "security": [], "parameters": [ { "in": "query", - "name": "tenantId", + "name": "urlId", "required": true, "schema": { "type": "string" @@ -9994,64 +15601,36 @@ ] } }, - "/user-notifications/{notificationId}/mark/{newStatus}": { - "post": { - "operationId": "UpdateUserNotificationStatus", + "/auth/my-account/moderate-comments/banned-users/counts": { + "get": { + "operationId": "GetCounts", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/UserNotificationWriteResponse" - }, - { - "$ref": "#/components/schemas/IgnoredResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetBannedUsersCountResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } } }, "tags": [ - "Public" + "Moderation" ], "security": [], "parameters": [ - { - "in": "query", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "notificationId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "newStatus", - "required": true, - "schema": { - "type": "string", - "enum": [ - "read", - "unread" - ] - } - }, { "in": "query", "name": "sso", @@ -10063,24 +15642,22 @@ ] } }, - "/user-notifications/{notificationId}/mark-opted/{optedInOrOut}": { - "post": { - "operationId": "UpdateUserNotificationCommentSubscriptionStatus", + "/gifs/trending/{tenantId}": { + "get": { + "operationId": "GetGifsTrending", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { + "title": "GetGifsTrendingResponse", "anyOf": [ { - "$ref": "#/components/schemas/UserNotificationWriteResponse" - }, - { - "$ref": "#/components/schemas/IgnoredResponse" + "$ref": "#/components/schemas/GifSearchResponse" }, { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/GifSearchInternalError" } ] } @@ -10088,14 +15665,13 @@ } } }, - "description": "Enable or disable notifications for a specific comment.", "tags": [ "Public" ], "security": [], "parameters": [ { - "in": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { @@ -10103,77 +15679,83 @@ } }, { - "in": "path", - "name": "notificationId", - "required": true, + "in": "query", + "name": "locale", + "required": false, "schema": { "type": "string" } }, - { - "in": "path", - "name": "optedInOrOut", - "required": true, - "schema": { - "type": "string", - "enum": [ - "in", - "out" - ] - } - }, { "in": "query", - "name": "commentId", - "required": true, + "name": "rating", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "sso", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "double", + "type": "number" } } ] } }, - "/user-notifications/set-subscription-state/{subscribedOrUnsubscribed}": { - "post": { - "operationId": "UpdateUserNotificationPageSubscriptionStatus", + "/gifs/search/{tenantId}": { + "get": { + "operationId": "GetGifsSearch", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { + "title": "GetGifsSearchResponse", "anyOf": [ { - "$ref": "#/components/schemas/UserNotificationWriteResponse" - }, - { - "$ref": "#/components/schemas/IgnoredResponse" + "$ref": "#/components/schemas/GifSearchResponse" }, { - "$ref": "#/components/schemas/APIError" + "$ref": "#/components/schemas/GifSearchInternalError" } ] } } } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } } }, - "description": "Enable or disable notifications for a page. When users are subscribed to a page, notifications are created\nfor new root comments, and also", "tags": [ "Public" ], "security": [], "parameters": [ { - "in": "query", + "in": "path", "name": "tenantId", "required": true, "schema": { @@ -10182,7 +15764,7 @@ }, { "in": "query", - "name": "urlId", + "name": "search", "required": true, "schema": { "type": "string" @@ -10190,59 +15772,67 @@ }, { "in": "query", - "name": "url", - "required": true, + "name": "locale", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "pageTitle", - "required": true, + "name": "rating", + "required": false, "schema": { "type": "string" } }, - { - "in": "path", - "name": "subscribedOrUnsubscribed", - "required": true, - "schema": { - "type": "string", - "enum": [ - "subscribe", - "unsubscribe" - ] - } - }, { "in": "query", - "name": "sso", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "double", + "type": "number" } } ] } }, - "/upload-image/{tenantId}": { - "post": { - "operationId": "UploadImage", + "/gifs/get-large/{tenantId}": { + "get": { + "operationId": "GetGifLarge", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UploadImageResponse" + "$ref": "#/components/schemas/GifGetLargeResponse" + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } } }, - "description": "Upload and resize an image", "tags": [ "Public" ], @@ -10257,43 +15847,14 @@ } }, { - "description": "Size preset: \"Default\" (1000x1000px) or \"CrossPlatform\" (creates sizes for popular devices)", - "in": "query", - "name": "sizePreset", - "required": false, - "schema": { - "$ref": "#/components/schemas/SizePreset" - } - }, - { - "description": "Page id that upload is happening from, to configure", "in": "query", - "name": "urlId", - "required": false, + "name": "largeInternalURLSanitized", + "required": true, "schema": { "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - }, - "required": [ - "file" - ] - } - } - } - } + ] } }, "/flag-comment/{commentId}": { @@ -10305,14 +15866,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -10367,14 +15931,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/PublicFeedPostsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/PublicFeedPostsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -10456,14 +16023,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CreateFeedPostResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/CreateFeedPostResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -10520,14 +16090,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ReactFeedPostResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/ReactFeedPostResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -10600,14 +16173,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/UserReactsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/UserReactsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -10657,14 +16233,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CreateFeedPostResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/CreateFeedPostResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -10727,22 +16306,26 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "properties": { - "status": { - "$ref": "#/components/schemas/APIStatus" - } - }, - "required": [ - "status" - ], - "type": "object" - }, - { - "$ref": "#/components/schemas/APIError" + "title": "DeleteFeedPostPublicResponse", + "properties": { + "status": { + "$ref": "#/components/schemas/APIStatus" } - ] + }, + "required": [ + "status" + ], + "type": "object" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -10797,14 +16380,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/FeedPostsStatsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/FeedPostsStatsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -10854,14 +16440,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetEventLogResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetEventLogResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -10909,7 +16498,7 @@ { "in": "query", "name": "endTime", - "required": true, + "required": false, "schema": { "format": "int64", "type": "integer" @@ -10927,14 +16516,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetEventLogResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetEventLogResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -10982,7 +16574,7 @@ { "in": "query", "name": "endTime", - "required": true, + "required": false, "schema": { "format": "int64", "type": "integer" @@ -11000,14 +16592,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/PublicAPIGetCommentTextResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/PublicAPIGetCommentTextResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -11062,14 +16657,100 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/PublicAPISetCommentTextResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/PublicAPISetCommentTextResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "commentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "broadcastId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "editKey", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sso", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentTextUpdateRequest" + } + } + } + } + } + }, + "/comments-for-user": { + "get": { + "operationId": "GetCommentsForUser", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCommentsForUserResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -11081,56 +16762,63 @@ "security": [], "parameters": [ { - "in": "path", - "name": "tenantId", - "required": true, + "in": "query", + "name": "userId", + "required": false, "schema": { "type": "string" } }, { - "in": "path", - "name": "commentId", - "required": true, + "in": "query", + "name": "direction", + "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/SortDirections" } }, { "in": "query", - "name": "broadcastId", - "required": true, + "name": "repliesToUserId", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "editKey", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "double", + "type": "number" } }, { "in": "query", - "name": "sso", + "name": "includei10n", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "locale", "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommentTextUpdateRequest" - } + }, + { + "in": "query", + "name": "isCrawler", + "required": false, + "schema": { + "type": "boolean" } } - } + ] } }, "/comments/{tenantId}": { @@ -11142,14 +16830,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetCommentsResponseWithPresence_PublicComment_" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetCommentsResponseWithPresence_PublicComment_" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -11404,14 +17095,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/SaveCommentsResponseWithPresence" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/SaveCommentsResponseWithPresence" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -11484,14 +17178,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/PublicAPIDeleteCommentResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/PublicAPIDeleteCommentResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -11554,14 +17251,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CheckBlockedCommentsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/CheckBlockedCommentsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -11609,14 +17309,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/VoteResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/VoteResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -11697,14 +17400,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/VoteDeleteResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/VoteDeleteResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -11783,14 +17489,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetCommentVoteUserNamesSuccessResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetCommentVoteUserNamesSuccessResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -11846,14 +17555,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ChangeCommentPinStatusResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/ChangeCommentPinStatusResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -11908,14 +17620,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ChangeCommentPinStatusResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/ChangeCommentPinStatusResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -11970,14 +17685,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIError" - }, - { - "$ref": "#/components/schemas/APIEmptyResponse" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -12032,14 +17750,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIError" - }, - { - "$ref": "#/components/schemas/APIEmptyResponse" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -12094,14 +17815,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/BlockSuccess" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/BlockSuccess" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -12156,14 +17880,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/UnblockSuccess" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/UnblockSuccess" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -12211,6 +17938,28 @@ } } }, + "/auth/logout": { + "put": { + "operationId": "LogoutPublic", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + } + }, + "tags": [ + "Public" + ], + "security": [], + "parameters": [] + } + }, "/api/v1/subscriptions": { "get": { "operationId": "GetSubscriptions", @@ -12404,6 +18153,7 @@ "content": { "application/json": { "schema": { + "title": "GetSSOUsersResponse", "properties": { "users": { "items": { @@ -12948,14 +18698,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetVotesResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetVotesResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -12993,14 +18746,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/VoteResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/VoteResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13068,14 +18824,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetVotesForUserResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetVotesForUserResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13131,14 +18890,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/VoteDeleteResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/VoteDeleteResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13186,14 +18948,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetUserResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetUserResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13233,14 +18998,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIGetUserBadgeResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIGetUserBadgeResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13278,14 +19046,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptySuccessResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptySuccessResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13333,14 +19104,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptySuccessResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptySuccessResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13380,14 +19154,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIGetUserBadgesResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIGetUserBadgesResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13468,14 +19245,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APICreateUserBadgeResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APICreateUserBadgeResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13517,14 +19297,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIGetUserBadgeProgressResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIGetUserBadgeProgressResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13564,14 +19347,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIGetUserBadgeProgressListResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIGetUserBadgeProgressListResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13629,14 +19415,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIGetUserBadgeProgressResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIGetUserBadgeProgressResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13676,14 +19465,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetTicketsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetTicketsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13748,14 +19540,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CreateTicketResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/CreateTicketResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13805,14 +19600,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetTicketResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetTicketResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13860,14 +19658,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ChangeTicketStateResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/ChangeTicketStateResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13925,14 +19726,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetTenantResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetTenantResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -13970,14 +19774,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14025,14 +19832,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14080,14 +19890,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetTenantsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetTenantsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14134,14 +19947,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CreateTenantResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/CreateTenantResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14183,14 +19999,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetTenantUserResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetTenantUserResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14228,14 +20047,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14291,14 +20113,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14354,14 +20179,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14417,14 +20245,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetTenantUsersResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetTenantUsersResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14463,14 +20294,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CreateTenantUserResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/CreateTenantUserResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14512,14 +20346,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14567,14 +20404,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetTenantPackageResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetTenantPackageResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14612,14 +20452,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14667,14 +20510,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14722,14 +20568,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14769,14 +20618,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetTenantPackagesResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetTenantPackagesResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14815,14 +20667,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CreateTenantPackageResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/CreateTenantPackageResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14864,14 +20719,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetTenantDailyUsagesResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetTenantDailyUsagesResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14939,14 +20797,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetQuestionResultResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetQuestionResultResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -14984,14 +20845,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -15039,14 +20903,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -15086,14 +20953,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetQuestionResultsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetQuestionResultsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -15172,14 +21042,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CreateQuestionResultResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/CreateQuestionResultResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -15221,14 +21094,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/AggregateQuestionResultsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/AggregateQuestionResultsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -15312,14 +21188,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/BulkAggregateQuestionResultsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/BulkAggregateQuestionResultsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -15369,14 +21248,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CombineQuestionResultsWithCommentsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/CombineQuestionResultsWithCommentsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -15479,14 +21361,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetQuestionConfigResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetQuestionConfigResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -15524,14 +21409,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -15579,14 +21467,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -15626,14 +21517,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetQuestionConfigsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetQuestionConfigsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -15672,14 +21566,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CreateQuestionConfigResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/CreateQuestionConfigResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -15721,14 +21618,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetPendingWebhookEventsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetPendingWebhookEventsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -15818,14 +21718,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetPendingWebhookEventCountResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetPendingWebhookEventCountResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -15906,14 +21809,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -15953,14 +21859,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetNotificationsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetNotificationsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16041,14 +21950,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetNotificationCountResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetNotificationCountResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16120,14 +22032,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16185,14 +22100,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetCachedNotificationCountResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetCachedNotificationCountResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16230,14 +22148,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16277,14 +22198,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetModeratorResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetModeratorResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16322,14 +22246,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16377,14 +22304,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16432,14 +22362,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetModeratorsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetModeratorsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16478,14 +22411,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CreateModeratorResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/CreateModeratorResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16527,14 +22463,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16582,14 +22521,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetHashTagsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetHashTagsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16628,14 +22570,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CreateHashTagResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/CreateHashTagResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16677,14 +22622,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/BulkCreateHashTagsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/BulkCreateHashTagsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16726,14 +22674,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/UpdateHashTagResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/UpdateHashTagResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16781,14 +22732,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16822,6 +22776,7 @@ "content": { "application/json": { "schema": { + "title": "DeleteHashTagRequestBody", "properties": { "tenantId": { "type": "string" @@ -16843,14 +22798,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetFeedPostsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetFeedPostsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16909,14 +22867,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CreateFeedPostsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/CreateFeedPostsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -16990,14 +22951,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -17047,14 +23011,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetEmailTemplateDefinitionsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetEmailTemplateDefinitionsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -17086,14 +23053,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetEmailTemplateRenderErrorsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetEmailTemplateRenderErrorsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -17142,14 +23112,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -17197,14 +23170,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetEmailTemplateResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetEmailTemplateResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -17242,14 +23218,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -17297,14 +23276,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -17344,14 +23326,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetEmailTemplatesResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetEmailTemplatesResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -17390,14 +23375,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CreateEmailTemplateResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/CreateEmailTemplateResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -17439,14 +23427,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/RenderEmailTemplateResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/RenderEmailTemplateResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -17496,6 +23487,7 @@ "content": { "application/json": { "schema": { + "title": "GetDomainConfigsResponse", "anyOf": [ { "properties": { @@ -17555,6 +23547,7 @@ "content": { "application/json": { "schema": { + "title": "AddDomainConfigResponse", "anyOf": [ { "properties": { @@ -17626,6 +23619,7 @@ "content": { "application/json": { "schema": { + "title": "GetDomainConfigResponse", "anyOf": [ { "properties": { @@ -17693,6 +23687,7 @@ "content": { "application/json": { "schema": { + "title": "DeleteDomainConfigResponse", "properties": { "status": {} }, @@ -17739,6 +23734,7 @@ "content": { "application/json": { "schema": { + "title": "PutDomainConfigResponse", "anyOf": [ { "properties": { @@ -17816,6 +23812,7 @@ "content": { "application/json": { "schema": { + "title": "PatchDomainConfigResponse", "anyOf": [ { "properties": { @@ -17895,14 +23892,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIGetCommentResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIGetCommentResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -17940,14 +23940,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIEmptyResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIEmptyResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -18019,14 +24022,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/DeleteCommentResult" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/DeleteCommentResult" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -18082,14 +24088,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIGetCommentsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APIGetCommentsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -18226,6 +24235,24 @@ "schema": { "$ref": "#/components/schemas/SortDirections" } + }, + { + "in": "query", + "name": "fromDate", + "required": false, + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "in": "query", + "name": "toDate", + "required": false, + "schema": { + "format": "int64", + "type": "integer" + } } ] }, @@ -18237,14 +24264,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/SaveCommentResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/APISaveCommentResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -18319,9 +24349,10 @@ "application/json": { "schema": { "items": { + "title": "SaveCommentsBulkResponse", "anyOf": [ { - "$ref": "#/components/schemas/SaveCommentResponse" + "$ref": "#/components/schemas/APISaveCommentResponse" }, { "$ref": "#/components/schemas/APIError" @@ -18405,14 +24436,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/FlagCommentResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/FlagCommentResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -18468,14 +24502,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/FlagCommentResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/FlagCommentResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -18531,14 +24568,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/BlockSuccess" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/BlockSuccess" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -18604,14 +24644,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/UnblockSuccess" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/UnblockSuccess" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -18677,14 +24720,17 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetAuditLogsResponse" - }, - { - "$ref": "#/components/schemas/APIError" - } - ] + "$ref": "#/components/schemas/GetAuditLogsResponse" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" } } } @@ -18760,7 +24806,15 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AggregationResponse" + "title": "AggregateResponse", + "anyOf": [ + { + "$ref": "#/components/schemas/AggregationResponse" + }, + { + "$ref": "#/components/schemas/AggregationAPIError" + } + ] } } }